Package org.jclouds.joyent.cloudapi.v6_5.compute.options

Examples of org.jclouds.joyent.cloudapi.v6_5.compute.options.JoyentCloudTemplateOptions


      assertEquals(options.getPrivateKey(), "-----BEGIN RSA PRIVATE KEY-----");
   }

   @Test
   public void testNullinstallPrivateKey() {
      JoyentCloudTemplateOptions options = new JoyentCloudTemplateOptions();
      assertEquals(options.getPrivateKey(), null);
   }


      assertEquals(options.getPrivateKey(), null);
   }

   @Test
   public void testinstallPrivateKeyStatic() throws IOException {
      JoyentCloudTemplateOptions options = installPrivateKey("-----BEGIN RSA PRIVATE KEY-----");
      assertEquals(options.getPrivateKey(), "-----BEGIN RSA PRIVATE KEY-----");
   }

      installPrivateKey(null);
   }

   @Test(expectedExceptions = IllegalArgumentException.class)
   public void testauthorizePublicKeyBadFormat() {
      JoyentCloudTemplateOptions options = new JoyentCloudTemplateOptions();
      options.authorizePublicKey("whompy");
   }

      options.authorizePublicKey("whompy");
   }

   @Test
   public void testauthorizePublicKey() throws IOException {
      JoyentCloudTemplateOptions options = new JoyentCloudTemplateOptions();
      options.authorizePublicKey("ssh-rsa");
      assertEquals(options.getPublicKey(), "ssh-rsa");
   }

      assertEquals(options.getPublicKey(), "ssh-rsa");
   }

   @Test
   public void testNullauthorizePublicKey() {
      JoyentCloudTemplateOptions options = new JoyentCloudTemplateOptions();
      assertEquals(options.getPublicKey(), null);
   }

      assertEquals(options.getPublicKey(), null);
   }

   @Test
   public void testauthorizePublicKeyStatic() throws IOException {
      JoyentCloudTemplateOptions options = authorizePublicKey("ssh-rsa");
      assertEquals(options.getPublicKey(), "ssh-rsa");
   }

      authorizePublicKey(null);
   }

   @Test(expectedExceptions = IllegalArgumentException.class)
   public void testblockOnPortBadFormat() {
      JoyentCloudTemplateOptions options = new JoyentCloudTemplateOptions();
      options.blockOnPort(-1, -1);
   }

      options.blockOnPort(-1, -1);
   }

   @Test
   public void testblockOnPort() {
      JoyentCloudTemplateOptions options = new JoyentCloudTemplateOptions();
      options.blockOnPort(22, 30);
      assertEquals(options.getPort(), 22);
      assertEquals(options.getSeconds(), 30);

   }

   }

   @Test
   public void testNullblockOnPort() {
      JoyentCloudTemplateOptions options = new JoyentCloudTemplateOptions();
      assertEquals(options.getPort(), -1);
      assertEquals(options.getSeconds(), -1);
   }

      assertEquals(options.getSeconds(), -1);
   }

   @Test
   public void testblockOnPortStatic() {
      JoyentCloudTemplateOptions options = blockOnPort(22, 30);
      assertEquals(options.getPort(), 22);
      assertEquals(options.getSeconds(), 30);
   }

TOP

Related Classes of org.jclouds.joyent.cloudapi.v6_5.compute.options.JoyentCloudTemplateOptions

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.