Package org.jclouds.route53.parse

Examples of org.jclouds.route53.parse.GetChangeResponseTest


         .addHeader(DATE, "Mon, 21 Jan 02013 19:29:03 -0800")
         .addHeader("X-Amzn-Authorization", authForDate).build();

   public void testListAtWhenResponseIs2xx() {
      Route53Api apiWhenAtExist = requestSendsResponse(listAt, listResponse);
      NextRecord next = NextRecord.name("testdoc2.example.com");
      assertEquals(apiWhenAtExist.getResourceRecordSetApiForHostedZone("Z1PA6795UKMFR9").listAt(next).toString(),
            new ListResourceRecordSetsResponseTest().expected().toString());
   }
View Full Code Here


         .addHeader(DATE, "Mon, 21 Jan 02013 19:29:03 -0800")
         .addHeader("X-Amzn-Authorization", authForDate).build();
  
   public void testListAtNameAndTypeWhenResponseIs2xx() {
      Route53Api apiWhenAtExist = requestSendsResponse(listAtNameAndType, listResponse);
      NextRecord next = NextRecord.nameAndType("testdoc2.example.com", "NS");
      assertEquals(apiWhenAtExist.getResourceRecordSetApiForHostedZone("Z1PA6795UKMFR9").listAt(next).toString(),
            new ListResourceRecordSetsResponseTest().expected().toString());
   }
View Full Code Here

      this.api = checkNotNull(api, "api");
   }

   @Override
   protected Function<Object, IterableWithMarker<HostedZone>> markerToNextForCallingArg0(String ignored) {
      final HostedZoneApi zoneApi = api.getHostedZoneApi();
      return new Function<Object, IterableWithMarker<HostedZone>>() {

         @Override
         public IterableWithMarker<HostedZone> apply(Object input) {
            return zoneApi.listAt(input.toString());
         }

         @Override
         public String toString() {
            return "listHostedZones()";
View Full Code Here

      this.api = checkNotNull(api, "api");
   }

   @Override
   protected Function<Object, IterableWithMarker<ResourceRecordSet>> markerToNextForCallingArg0(String zoneId) {
      final ResourceRecordSetApi resourceResourceRecordSetApi = api.getResourceRecordSetApiForHostedZone(zoneId);
      return new Function<Object, IterableWithMarker<ResourceRecordSet>>() {

         @Override
         public IterableWithMarker<ResourceRecordSet> apply(Object input) {
            return resourceResourceRecordSetApi.listAt(NextRecord.class.cast(input));
         }

         @Override
         public String toString() {
            return "listResourceRecordSets()";
View Full Code Here

         .payload(payloadFromResourceWithContentType("/new_zone.xml", "text/xml")).build();

   public void testCreateWithReferenceWhenResponseIs2xx() {
      Route53Api success = requestSendsResponse(createWithReference, createResponse);
      assertEquals(success.getHostedZoneApi().createWithReference("jclouds.org.", "expect").toString(),
            new CreateHostedZoneResponseTest().expected().toString());
   }
View Full Code Here

                     "application/xml")).build();

   public void testCreateWithReferenceAndCommentWhenResponseIs2xx() {
      Route53Api success = requestSendsResponse(createWithReferenceAndComment, createResponse);
      assertEquals(success.getHostedZoneApi().createWithReferenceAndComment("jclouds.org.", "expect", "comment").toString(),
            new CreateHostedZoneResponseTest().expected().toString());
   }
View Full Code Here

         .payload(payloadFromResourceWithContentType("/change.xml", "text/xml")).build();

   public void testCreateWhenResponseIs2xx() {
      Route53Api success = requestSendsResponse(create, jobResponse);
      assertEquals(success.getResourceRecordSetApiForHostedZone("Z1PA6795UKMFR9").create(ResourceRecordSet.builder().name("jclouds.org.").type("TXT").add("my texts").build()).toString(),
            new GetChangeResponseTest().expected().toString());
   }
View Full Code Here

      assertEquals(success.getResourceRecordSetApiForHostedZone("Z1PA6795UKMFR9").apply(
            ChangeBatch.builder()
                       .delete(ResourceRecordSet.builder().name("jclouds.org.").type("TXT").add("my texts").build())
                       .create(ResourceRecordSet.builder().name("jclouds.org.").type("TXT").add("my better texts").build())
                       .build()).toString(),
            new GetChangeResponseTest().expected().toString());
   }
View Full Code Here

      assertEquals(success.getResourceRecordSetApiForHostedZone("Z1PA6795UKMFR9").create(ResourceRecordSet.builder()
                                                                                                          .name("jclouds.org.")
                                                                                                          .type("TXT")
                                                                                                          .ttl(0)
                                                                                                          .add("my texts").build()).toString(),
            new GetChangeResponseTest().expected().toString());
   }
View Full Code Here

   HttpResponse getChangeResponse = HttpResponse.builder().statusCode(OK.getStatusCode())
         .payload(payloadFromResourceWithContentType("/change.xml", "text/xml")).build();

   public void testGetChangeWhenResponseIs2xx() {
      Route53Api api = requestSendsResponse(getChange, getChangeResponse);
      assertEquals(api.getChange("C2682N5HXP0BZ4").toString(), new GetChangeResponseTest().expected().toString());
   }
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.