public void testThawWhenResponseIs2xx() { DynECTApi success = requestsSendResponses(createSession, createSessionResponse, thaw, deleteResponse); assertEquals( success.getZoneApi().thaw("jclouds.org").toString(), new DeleteZoneResponseTest().expected().toString()); }
public void testCreateWithContactWhenResponseIs2xx() { DynECTApi success = requestsSendResponses(createSession, createSessionResponse, create, createResponse); assertEquals( success.getZoneApi().scheduleCreateWithContact("jclouds.org", "*****@*****.**"), Job.success(285351593L)); }
public void testGetWhenResponseIs2xx() { DynECTApi success = requestsSendResponses(createSession, createSessionResponse, get, getResponse); assertEquals( success.getZoneApi().get("jclouds.org").toString(), new GetZoneResponseTest().expected().toString()); }
public void testCreateWhenResponseIs2xx() { DynECTApi success = requestsSendResponses(createSession, createSessionResponse, create, createResponse); assertEquals( success .getZoneApi() .scheduleCreate( CreatePrimaryZone.builder() .fqdn("jclouds.org") .contact("*****@*****.**") .build()), Job.success(285351593L)); }
public void testCreateWhenResponseIs2xx() { DynECTApi apiCreatesSession = requestSendsResponse(createSession, createSessionResponse); assertEquals( apiCreatesSession .getSessionApi() .login( SessionCredentials.builder() .customerName("jclouds") .userName("joe") .password("letmein") .build()) .toString(), new CreateSessionResponseTest().expected().toString()); }
public void testDeleteWhenResponseIs404() { DynECTApi fail = requestsSendResponses(createSession, createSessionResponse, delete, notFound); assertNull(fail.getZoneApi().delete("jclouds.org")); }
public void testListWhenResponseIs2xx() { DynECTApi success = requestsSendResponses(createSession, createSessionResponse, list, listResponse); assertEquals( success.getZoneApi().list().toString(), new ListZonesResponseTest().expected().toString()); }
public void testLogout() { DynECTApi apiWhenLogoutSuccess = requestSendsResponse(logout, logoutResponse); apiWhenLogoutSuccess.getSessionApi().logout(authToken); }
public void testSessionInvalid() { DynECTApi apiWhenInvalid = requestSendsResponse(isValid, invalidResponse); assertFalse(apiWhenInvalid.getSessionApi().isValid(authToken)); }