Package org.jclouds.ultradns.ws.domain

Examples of org.jclouds.ultradns.ws.domain.IdAndName


@Test(groups = "live", singleThreaded = true, testName = "UltraDNSWSApiLiveTest")
public class UltraDNSWSApiLiveTest extends BaseUltraDNSWSApiLiveTest {

   @Test
   protected void testGetCurrentAccount() {
      IdAndName account = api.getCurrentAccount();
      checkAccount(account);
   }
View Full Code Here


public class GetAccountsListOfUserResponseTest extends BaseHandlerTest {

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

      IdAndName expected = expected();

      AccountHandler handler = injector.getInstance(AccountHandler.class);
      IdAndName result = factory.create(handler).parse(is);

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

   private DirectionalPoolRecordDetail checkRecordConsistent(String dname, String recordId,
         DirectionalPoolRecord record, DirectionalGroup group) {
      DirectionalPoolRecordDetail recordDetail = getRecordByDNameAndId(dname, recordId).get();
      checkDirectionalRecordDetail(recordDetail);
      IdAndName rGroup = recordDetail.getGeolocationGroup().get();
      assertEquals(rGroup.getName(), group.getName());
      // TODO: look up each key with all and do a comparison
      if (!group.containsValue("all"))
         assertEquals(groupApi().get(rGroup.getId()), group);
      assertFalse(recordDetail.getGroup().isPresent());
      assertFalse(recordDetail.getSourceIpGroup().isPresent());
      assertEquals(recordDetail.getName(), dname);
      assertEquals(recordDetail.getZoneName(), zoneName);
      assertEquals(recordDetail.getRecord(), record);
View Full Code Here

   private DirectionalPoolRecordDetail checkRecordConsistentInNonConfiguredGroup(String dname, String recordId,
         DirectionalPoolRecord record) {
      DirectionalPoolRecordDetail recordDetail = getRecordByDNameAndId(dname, recordId).get();
      checkDirectionalRecordDetail(recordDetail);
      IdAndName rGroup = recordDetail.getGroup().get();
      assertEquals(rGroup.getName(), "All Non-Configured Regions");
      DirectionalGroup allNonConfigured = groupApi().get(rGroup.getId());
      assertEquals(allNonConfigured.getName(), "All Non-Configured Regions");
      assertEquals(allNonConfigured.size(), 323);
      assertFalse(recordDetail.getGeolocationGroup().isPresent());
      assertFalse(recordDetail.getSourceIpGroup().isPresent());
      assertEquals(recordDetail.getZoneName(), zoneName);
View Full Code Here

   @Override
   public void startElement(String url, String name, String qName, Attributes attrs) {
      if (equalsOrSuffix(qName, "Region")) {
         Map<String, String> attributes = cleanseAttributes(attrs);
         IdAndName region = IdAndName.create(attributes.get("RegionID"), attributes.get("RegionName"));
         regions.putAll(region, Splitter.on(';').split(attributes.get("TerritoryName")));
      }
   }
View Full Code Here

@Test(groups = "live", singleThreaded = true, testName = "UltraDNSWSApiLiveTest")
public class UltraDNSWSApiLiveTest extends BaseUltraDNSWSApiLiveTest {

   @Test
   protected void testGetCurrentAccount() {
      IdAndName account = api.getCurrentAccount();
      checkAccount(account);
   }
View Full Code Here

public class GetAccountsListOfUserResponseTest extends BaseHandlerTest {

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

      IdAndName expected = expected();

      AccountHandler handler = injector.getInstance(AccountHandler.class);
      IdAndName result = factory.create(handler).parse(is);

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

   private DirectionalPoolRecordDetail checkRecordConsistent(String dname, String recordId,
         DirectionalPoolRecord record, DirectionalGroup group) {
      DirectionalPoolRecordDetail recordDetail = getRecordByDNameAndId(dname, recordId).get();
      checkDirectionalRecordDetail(recordDetail);
      IdAndName rGroup = recordDetail.getGeolocationGroup().get();
      assertEquals(rGroup.getName(), group.getName());
      // TODO: look up each key with all and do a comparison
      if (!group.containsValue("all"))
         assertEquals(groupApi().get(rGroup.getId()), group);
      assertFalse(recordDetail.getGroup().isPresent());
      assertFalse(recordDetail.getSourceIpGroup().isPresent());
      assertEquals(recordDetail.getName(), dname);
      assertEquals(recordDetail.getZoneName(), zoneName);
      assertEquals(recordDetail.getRecord(), record);
View Full Code Here

   private DirectionalPoolRecordDetail checkRecordConsistentInNonConfiguredGroup(String dname, String recordId,
         DirectionalPoolRecord record) {
      DirectionalPoolRecordDetail recordDetail = getRecordByDNameAndId(dname, recordId).get();
      checkDirectionalRecordDetail(recordDetail);
      IdAndName rGroup = recordDetail.getGroup().get();
      assertEquals(rGroup.getName(), "All Non-Configured Regions");
      DirectionalGroup allNonConfigured = groupApi().get(rGroup.getId());
      assertEquals(allNonConfigured.getName(), "All Non-Configured Regions");
      assertEquals(allNonConfigured.size(), 323);
      assertFalse(recordDetail.getGeolocationGroup().isPresent());
      assertFalse(recordDetail.getSourceIpGroup().isPresent());
      assertEquals(recordDetail.getZoneName(), zoneName);
View Full Code Here

   @Override
   public void startElement(String url, String name, String qName, Attributes attrs) {
      if (equalsOrSuffix(qName, "Region")) {
         Map<String, String> attributes = cleanseAttributes(attrs);
         IdAndName region = IdAndName.create(attributes.get("RegionID"), attributes.get("RegionName"));
         regions.putAll(region, Splitter.on(';').split(attributes.get("TerritoryName")));
      }
   }
View Full Code Here

TOP

Related Classes of org.jclouds.ultradns.ws.domain.IdAndName

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.