예제 #1
0
 public void testCreateWithContactWhenResponseIs2xx() {
   DynECTApi success =
       requestsSendResponses(createSession, createSessionResponse, create, createResponse);
   assertEquals(
       success.getZoneApi().scheduleCreateWithContact("jclouds.org", "*****@*****.**"),
       Job.success(285351593L));
 }
예제 #2
0
 public void testGetWhenResponseIs2xx() {
   DynECTApi success =
       requestsSendResponses(createSession, createSessionResponse, get, getResponse);
   assertEquals(
       success.getZoneApi().get("jclouds.org").toString(),
       new GetZoneResponseTest().expected().toString());
 }
예제 #3
0
 public void testThawWhenResponseIs2xx() {
   DynECTApi success =
       requestsSendResponses(createSession, createSessionResponse, thaw, deleteResponse);
   assertEquals(
       success.getZoneApi().thaw("jclouds.org").toString(),
       new DeleteZoneResponseTest().expected().toString());
 }
예제 #4
0
 public void testCreateWhenResponseIs2xx() {
   DynECTApi success =
       requestsSendResponses(createSession, createSessionResponse, create, createResponse);
   assertEquals(
       success
           .getZoneApi()
           .scheduleCreate(
               CreatePrimaryZone.builder()
                   .fqdn("jclouds.org")
                   .contact("*****@*****.**")
                   .build()),
       Job.success(285351593L));
 }
예제 #5
0
 public void testDeleteWhenResponseIs404() {
   DynECTApi fail = requestsSendResponses(createSession, createSessionResponse, delete, notFound);
   assertNull(fail.getZoneApi().delete("jclouds.org"));
 }
예제 #6
0
 public void testListWhenResponseIs2xx() {
   DynECTApi success =
       requestsSendResponses(createSession, createSessionResponse, list, listResponse);
   assertEquals(
       success.getZoneApi().list().toString(), new ListZonesResponseTest().expected().toString());
 }