Package org.jclouds.route53.parse

Examples of org.jclouds.route53.parse.GetChangeResponseTest


         this.comment = Optional.fromNullable(comment);
         return this;
      }

      public Builder create(ResourceRecordSet rrs) {
         this.changes.add(new ActionOnResourceRecordSet(Action.CREATE, rrs));
         return this;
      }
View Full Code Here


            create(rrs);
         return this;
      }

      public Builder delete(ResourceRecordSet rrs) {
         this.changes.add(new ActionOnResourceRecordSet(Action.DELETE, rrs));
         return this;
      }
View Full Code Here

      public boolean equals(Object obj) {
         if (this == obj)
            return true;
         if (obj == null || getClass() != obj.getClass())
            return false;
         ActionOnResourceRecordSet that = ActionOnResourceRecordSet.class.cast(obj);
         return equal(this.action, that.action) && equal(this.rrs, that.rrs);
      }
View Full Code Here

         this.comment = Optional.fromNullable(comment);
         return this;
      }

      public Builder create(ResourceRecordSet rrs) {
         this.changes.add(new ActionOnResourceRecordSet(Action.CREATE, rrs));
         return this;
      }
View Full Code Here

            create(rrs);
         return this;
      }

      public Builder delete(ResourceRecordSet rrs) {
         this.changes.add(new ActionOnResourceRecordSet(Action.DELETE, rrs));
         return this;
      }
View Full Code Here

         checkAllRRs(zone.getId());
      }
   }

   private void checkAllRRs(String zoneId) {
      HostedZone zone = api.getHostedZoneApi().get(zoneId).getZone();
      List<ResourceRecordSet> records = api(zone.getId()).list().concat().toList();
      assertEquals(zone.getResourceRecordSetCount(), records.size());

      for (ResourceRecordSet rrs : records) {
         recordTypeCounts.getUnchecked(rrs.getType()).addAndGet(
               rrs.getAliasTarget().isPresent() ? 1 : rrs.getValues().size());
         checkRRS(rrs);
View Full Code Here

public class GetHostedZoneResponseTest extends BaseHandlerTest {

   public void test() {
      InputStream is = getClass().getResourceAsStream("/hosted_zone.xml");

      HostedZoneAndNameServers expected = expected();

      GetHostedZoneResponseHandler handler = injector.getInstance(GetHostedZoneResponseHandler.class);
      HostedZoneAndNameServers result = factory.create(handler).parse(is);

      assertEquals(result, expected);
   }
View Full Code Here

      this.changeHandler = changeHandler;
   }

   @Override
   public NewHostedZone getResult() {
      HostedZoneAndNameServers zone = zoneHandler.getResult();
      return NewHostedZone.create(zone, changeHandler.getResult());
   }
View Full Code Here

public class GetHostedZoneResponseTest extends BaseHandlerTest {

   public void test() {
      InputStream is = getClass().getResourceAsStream("/hosted_zone.xml");

      HostedZoneAndNameServers expected = expected();

      GetHostedZoneResponseHandler handler = injector.getInstance(GetHostedZoneResponseHandler.class);
      HostedZoneAndNameServers result = factory.create(handler).parse(is);

      assertEquals(result, expected);
   }
View Full Code Here

   @Test
   public void testCreateAndDeleteHostedZone() {
      String name = System.getProperty("user.name").replace('.', '-') + ".zone.route53test.jclouds.org.";
      String nonce = name + " @ " + new Date();
      String comment = name + " for " + JcloudsVersion.get();
      NewHostedZone newHostedZone = api().createWithReferenceAndComment(name, nonce, comment);
      getAnonymousLogger().info("created zone: " + newHostedZone);
      try {
         checkHostedZone(newHostedZone.getZone());
         assertEquals(newHostedZone.getChange().getStatus(), PENDING, "invalid status on zone " + newHostedZone);
         assertTrue(newHostedZone.getNameServers().size() > 0, "no name servers for zone " + newHostedZone);
         assertEquals(newHostedZone.getZone().getName(), name);
         assertEquals(newHostedZone.getZone().getCallerReference(), nonce);
         assertEquals(newHostedZone.getZone().getComment().get(), comment);
        
         assertTrue(inSync.apply(newHostedZone.getChange()), "zone didn't sync " + newHostedZone);
      } finally {
         Change delete = api().delete(newHostedZone.getZone().getId());
         assertTrue(inSync.apply(delete), "delete didn't sync " + delete);
      }
   }
View Full Code Here

TOP

Related Classes of org.jclouds.route53.parse.GetChangeResponseTest

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.