> +      assertEquals(transformed.getOperatingSystem().getFamily(), 
> OsFamily.SUSE);
> +      assertEquals(transformed.getOperatingSystem().getVersion(), "13.1");
> +      assertEquals(transformed.getId(), OSImage.label());
> +      assertEquals(transformed.getProviderId(), OSImage.publisherName());
> +      assertEquals(transformed.getLocation().getId(), OSImage.location());
> +   }
> +
> +   private static OSImage createOSImage(String name) {
> +      return OSImage.create(name, "Central US", null, "openSUSE 13.1",
> +            "openSUSE 13.1 brings updated desktop environments and software, 
> lot of polishing, a brand new KDE theme, "
> +                  + "complete systemd integration and many other features.",
> +            "MSDN", OSImage.Type.WINDOWS, "SUSE",
> +            
> URI.create("http://example.blob.core.windows.net/disks/myimage.vhd";), 30,
> +            
> Arrays.asList("http://www.ubuntu.com/project/about-ubuntu/licensing";));
> +   }
> +}

Add also tests for each Operating system case: unrecognized and others, and 
also for the other OS versions. You are doing custom parsing of every os 
version, and that should be properly unit tested.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/117/files#r22192331

Reply via email to