ultradns no longer throws an exception if you attempt to list zones of an unknown account

This commit is contained in:
adriancole 2013-03-24 11:40:26 -07:00
parent bc52b54945
commit 6b14bec945
3 changed files with 5 additions and 7 deletions

View File

@ -58,10 +58,9 @@ public interface ZoneApi {
/**
* Lists all zones in the specified account.
*
* @throws ResourceNotFoundException
* if the account doesn't exist
* @returns empty if no zones, or account doesn't exist
*/
FluentIterable<Zone> listByAccount(String accountId) throws ResourceNotFoundException;
FluentIterable<Zone> listByAccount(String accountId);
/**
* Lists all zones in the specified account of type

View File

@ -77,8 +77,7 @@ public interface ZoneAsyncApi {
@POST
@XMLResponseParser(ZoneListHandler.class)
@Payload("<v01:getZonesOfAccount><accountId>{accountId}</accountId><zoneType>all</zoneType></v01:getZonesOfAccount>")
ListenableFuture<FluentIterable<Zone>> listByAccount(@PayloadParam("accountId") String accountId)
throws ResourceNotFoundException;
ListenableFuture<FluentIterable<Zone>> listByAccount(@PayloadParam("accountId") String accountId);
/**
* @see ZoneApi#listByAccountAndType(String, Type)

View File

@ -82,9 +82,9 @@ public class ZoneApiLiveTest extends BaseUltraDNSWSApiLiveTest {
}
}
@Test(expectedExceptions = ResourceNotFoundException.class, expectedExceptionsMessageRegExp = "Account not found in the system. ID: AAAAAAAAAAAAAAAA")
@Test
public void testListZonesByAccountWhenAccountIdNotFound() {
api().listByAccount("AAAAAAAAAAAAAAAA");
assertTrue(api().listByAccount("AAAAAAAAAAAAAAAA").isEmpty());
}
@Test