diff --git a/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/features/RoundRobinPoolApiExpectTest.java b/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/features/RoundRobinPoolApiExpectTest.java index 8015f66bf2..35f5d24f5b 100644 --- a/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/features/RoundRobinPoolApiExpectTest.java +++ b/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/features/RoundRobinPoolApiExpectTest.java @@ -25,7 +25,7 @@ import org.jclouds.http.HttpResponse; import org.jclouds.ultradns.ws.UltraDNSWSApi; import org.jclouds.ultradns.ws.UltraDNSWSExceptions.ResourceAlreadyExistsException; import org.jclouds.ultradns.ws.internal.BaseUltraDNSWSApiExpectTest; -import org.jclouds.ultradns.ws.parse.GetLoadBalancingPoolsByZoneResponseTest; +import org.jclouds.ultradns.ws.parse.GetRRLoadBalancingPoolsByZoneResponseTest; import org.jclouds.ultradns.ws.parse.GetResourceRecordsOfResourceRecordResponseTest; import org.testng.annotations.Test; @@ -79,7 +79,7 @@ public class RoundRobinPoolApiExpectTest extends BaseUltraDNSWSApiExpectTest { assertEquals( success.getRoundRobinPoolApiForZone("jclouds.org.").list().toString(), - new GetLoadBalancingPoolsByZoneResponseTest().expected().toString()); + new GetRRLoadBalancingPoolsByZoneResponseTest().expected().toString()); } HttpRequest listRecords = HttpRequest.builder().method("POST") @@ -108,7 +108,7 @@ public class RoundRobinPoolApiExpectTest extends BaseUltraDNSWSApiExpectTest { public void testDeleteWhenResponseIs2xx() { UltraDNSWSApi success = requestSendsResponse(delete, deleteResponse); - success.getZoneApi().delete("04053D8E57C7931F"); + success.getRoundRobinPoolApiForZone("jclouds.org.").delete("04053D8E57C7931F"); } HttpResponse poolDoesntExist = HttpResponse.builder().message("Server Epoolor").statusCode(500) @@ -116,6 +116,6 @@ public class RoundRobinPoolApiExpectTest extends BaseUltraDNSWSApiExpectTest { public void testDeleteWhenResponseRRNotFound() { UltraDNSWSApi notFound = requestSendsResponse(delete, poolDoesntExist); - notFound.getZoneApi().delete("04053D8E57C7931F"); + notFound.getRoundRobinPoolApiForZone("jclouds.org.").delete("04053D8E57C7931F"); } } diff --git a/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/features/RoundRobinPoolApiLiveTest.java b/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/features/RoundRobinPoolApiLiveTest.java index 964b9479e8..651b86aff3 100644 --- a/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/features/RoundRobinPoolApiLiveTest.java +++ b/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/features/RoundRobinPoolApiLiveTest.java @@ -61,17 +61,18 @@ public class RoundRobinPoolApiLiveTest extends BaseUltraDNSWSApiLiveTest { context.getApi().getZoneApi().createInAccount(zoneName, account.getId()); } - private void checkLBPool(RoundRobinPool pool) { + private void checkRRPool(RoundRobinPool pool) { checkNotNull(pool.getZoneId(), "ZoneId cannot be null for a RoundRobinPool %s", pool); checkNotNull(pool.getId(), "Id cannot be null for a RoundRobinPool %s", pool); checkNotNull(pool.getName(), "Name cannot be null for a RoundRobinPool %s", pool); + checkNotNull(pool.getDName(), "DName cannot be null for a RoundRobinPool %s", pool); } @Test public void testListRRPools() { for (Zone zone : context.getApi().getZoneApi().listByAccount(account.getId())) { for (RoundRobinPool pool : api(zone.getName()).list()) { - checkLBPool(pool); + checkRRPool(pool); } } } diff --git a/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetLoadBalancingPoolsByZoneResponseTest.java b/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetRRLoadBalancingPoolsByZoneResponseTest.java similarity index 64% rename from providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetLoadBalancingPoolsByZoneResponseTest.java rename to providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetRRLoadBalancingPoolsByZoneResponseTest.java index 177068df27..05b43d12a7 100644 --- a/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetLoadBalancingPoolsByZoneResponseTest.java +++ b/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetRRLoadBalancingPoolsByZoneResponseTest.java @@ -33,8 +33,8 @@ import com.google.common.collect.ImmutableList; /** * @author Adrian Cole */ -@Test(testName = "GetLoadBalancingPoolsByZoneResponseTest") -public class GetLoadBalancingPoolsByZoneResponseTest extends BaseHandlerTest { +@Test(testName = "GetRRLoadBalancingPoolsByZoneResponseTest") +public class GetRRLoadBalancingPoolsByZoneResponseTest extends BaseHandlerTest { public void test() { InputStream is = getClass().getResourceAsStream("/rrpools.xml"); @@ -50,19 +50,19 @@ public class GetLoadBalancingPoolsByZoneResponseTest extends BaseHandlerTest { public FluentIterable expected() { return FluentIterable.from(ImmutableList. builder() .add(RoundRobinPool.builder() - .zoneId("0000000000000001") - .id("000000000000002") - .name("app-uswest1.jclouds.org.") - .dname("app-uswest1.jclouds.org.").build()) + .zoneId("0000000000000001") + .id("000000000000002") + .name("app-uswest1.jclouds.org.") + .dname("app-uswest1.jclouds.org.").build()) .add(RoundRobinPool.builder() - .zoneId("0000000000000001") - .id("000000000000003") - .name("app-uswest2.jclouds.org.") - .dname("app-uswest2.jclouds.org.").build()) + .zoneId("0000000000000001") + .id("000000000000003") + .name("app-uswest2.jclouds.org.") + .dname("app-uswest2.jclouds.org.").build()) .add(RoundRobinPool.builder() - .zoneId("0000000000000001") - .id("000000000000004") - .name("app-euwest.jclouds.org.") - .dname("app-euwest.jclouds.org.").build()).build()); + .zoneId("0000000000000001") + .id("000000000000004") + .name("app-euwest.jclouds.org.") + .dname("app-euwest.jclouds.org.").build()).build()); } } \ No newline at end of file diff --git a/providers/ultradns-ws/src/test/resources/delete_lbpool.xml b/providers/ultradns-ws/src/test/resources/delete_lbpool.xml index 133805f818..f131cf03dc 100644 --- a/providers/ultradns-ws/src/test/resources/delete_lbpool.xml +++ b/providers/ultradns-ws/src/test/resources/delete_lbpool.xml @@ -1 +1 @@ -identitycredential04053D8E57C7931F \ No newline at end of file +identitycredential04053D8E57C7931FYes \ No newline at end of file