Package org.jclouds.elasticstack.domain

Examples of org.jclouds.elasticstack.domain.StandardDrive


   public void testEmptyMapReturnsNull() {
      assertEquals(MAP_TO_STANDARD_DRIVE.apply(ImmutableMap.<String, String> of()), null);
   }

   public void testBasics() {
      StandardDrive expects = new StandardDrive.Builder().name("foo").size(100l).media(MediaType.DISK)
            .format(ImageConversionType.GZIP).rawSize(5l).build();
      assertEquals(MAP_TO_STANDARD_DRIVE.apply(ImmutableMap.of("name", "foo", "size", "100", "format", "gzip", "media",
            "disk", "rawsize", "5")), expects);
   }
View Full Code Here


      assertOS("Windows Web Server 2008 R2 SP1 with SQL Server 2008 R2 Web Edition", OsFamily.WINDOWS,
            "2008 R2 SP1 with SQL Server 2008 R2 Web Edition", true);
   }

   private void assertOS(String name, OsFamily expectedFamily, String expectedVersion, boolean expectedIs64bit) {
      StandardDrive drive = standardDrive(name);
      WellKnownImage image = function.apply(drive);

      assertEquals(image.getOsFamily(), expectedFamily, String.format("Parsing family for [%s]:", name));
      assertEquals(image.getOsVersion(), expectedVersion, String.format("Parsing version for [%s]:", name));
      assertEquals(image.is64bit(), expectedIs64bit, String.format("Parsing arch for [%s]:", name));
View Full Code Here

   public void testEmptyMapReturnsNull() {
      assertEquals(MAP_TO_STANDARD_DRIVE.apply(ImmutableMap.<String, String> of()), null);
   }

   public void testBasics() {
      StandardDrive expects = new StandardDrive.Builder().name("foo").size(100l).media(MediaType.DISK)
            .format(ImageConversionType.GZIP).rawSize(5l).build();
      assertEquals(MAP_TO_STANDARD_DRIVE.apply(ImmutableMap.of("name", "foo", "size", "100", "format", "gzip", "media",
            "disk", "rawsize", "5")), expects);
   }
View Full Code Here

      assertOS("Windows Web Server 2008 R2 SP1 with SQL Server 2008 R2 Web Edition", OsFamily.WINDOWS,
            "2008 R2 SP1 with SQL Server 2008 R2 Web Edition", true);
   }

   private void assertOS(String name, OsFamily expectedFamily, String expectedVersion, boolean expectedIs64bit) {
      StandardDrive drive = standardDrive(name);
      WellKnownImage image = function.apply(drive);

      assertEquals(image.getOsFamily(), expectedFamily, String.format("Parsing family for [%s]:", name));
      assertEquals(image.getOsVersion(), expectedVersion, String.format("Parsing version for [%s]:", name));
      assertEquals(image.is64bit(), expectedIs64bit, String.format("Parsing arch for [%s]:", name));
View Full Code Here

TOP

Related Classes of org.jclouds.elasticstack.domain.StandardDrive

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.