@Override protected Function<Object, IterableWithMarker<HostedZone>> markerToNextForCallingArg0(String ignored) { final HostedZoneApi zoneApi = api.getHostedZoneApi(); return new Function<Object, IterableWithMarker<HostedZone>>() { @Override public IterableWithMarker<HostedZone> apply(Object input) { return zoneApi.listAt(input.toString()); } @Override public String toString() { return "listHostedZones()"; } }; } }
@Override protected Function<Object, IterableWithMarker<ResourceRecordSet>> markerToNextForCallingArg0(String zoneId) { final ResourceRecordSetApi resourceResourceRecordSetApi = api.getResourceRecordSetApiForHostedZone(zoneId); return new Function<Object, IterableWithMarker<ResourceRecordSet>>() { @Override public IterableWithMarker<ResourceRecordSet> apply(Object input) { return resourceResourceRecordSetApi.listAt(NextRecord.class.cast(input)); } @Override public String toString() { return "listResourceRecordSets()"; } }; } }
@Test protected void testGetChangeReturnsNullOnNotFound() { assertNull(api.getChange("FOOOBAR")); } }
@Override protected Function<Object, IterableWithMarker<HostedZone>> markerToNextForCallingArg0(String ignored) { final HostedZoneApi zoneApi = api.getHostedZoneApi(); return new Function<Object, IterableWithMarker<HostedZone>>() { @Override public IterableWithMarker<HostedZone> apply(Object input) { return zoneApi.listAt(input.toString()); } @Override public String toString() { return "listHostedZones()"; } }; } }
@Override protected Function<Object, IterableWithMarker<ResourceRecordSet>> markerToNextForCallingArg0(String zoneId) { final ResourceRecordSetApi resourceResourceRecordSetApi = api.getResourceRecordSetApiForHostedZone(zoneId); return new Function<Object, IterableWithMarker<ResourceRecordSet>>() { @Override public IterableWithMarker<ResourceRecordSet> apply(Object input) { return resourceResourceRecordSetApi.listAt(NextRecord.class.cast(input)); } @Override public String toString() { return "listResourceRecordSets()"; } }; } }
@Test protected void testGetChangeReturnsNullOnNotFound() { assertNull(api.getChange("FOOOBAR")); } }
@Override protected Function<Object, IterableWithMarker<HostedZone>> markerToNextForCallingArg0(String ignored) { final HostedZoneApi zoneApi = api.getHostedZoneApi(); return new Function<Object, IterableWithMarker<HostedZone>>() { @Override public IterableWithMarker<HostedZone> apply(Object input) { return zoneApi.listAt(input.toString()); } @Override public String toString() { return "listHostedZones()"; } }; } }
@Override protected Function<Object, IterableWithMarker<ResourceRecordSet>> markerToNextForCallingArg0(String zoneId) { final ResourceRecordSetApi resourceResourceRecordSetApi = api.getResourceRecordSetApiForHostedZone(zoneId); return new Function<Object, IterableWithMarker<ResourceRecordSet>>() { @Override public IterableWithMarker<ResourceRecordSet> apply(Object input) { return resourceResourceRecordSetApi.listAt(NextRecord.class.cast(input)); } @Override public String toString() { return "listResourceRecordSets()"; } }; } }
public void testGetChangeNullWhenResponseIs404() { Route53Api api = requestSendsResponse(getChange, notFound); assertNull(api.getChange("C2682N5HXP0BZ4")); } }
@Override protected Function<Object, IterableWithMarker<HostedZone>> markerToNextForCallingArg0(String ignored) { final HostedZoneApi zoneApi = api.getHostedZoneApi(); return new Function<Object, IterableWithMarker<HostedZone>>() { @Override public IterableWithMarker<HostedZone> apply(Object input) { return zoneApi.listAt(input.toString()); } @Override public String toString() { return "listHostedZones()"; } }; } }
@Override protected Function<Object, IterableWithMarker<ResourceRecordSet>> markerToNextForCallingArg0(String zoneId) { final ResourceRecordSetApi resourceResourceRecordSetApi = api.getResourceRecordSetApiForHostedZone(zoneId); return new Function<Object, IterableWithMarker<ResourceRecordSet>>() { @Override public IterableWithMarker<ResourceRecordSet> apply(Object input) { return resourceResourceRecordSetApi.listAt(NextRecord.class.cast(input)); } @Override public String toString() { return "listResourceRecordSets()"; } }; } }
public void testGetChangeNullWhenResponseIs404() { Route53Api api = requestSendsResponse(getChange, notFound); assertNull(api.getChange("C2682N5HXP0BZ4")); } }
protected HostedZoneApi api() { return api.getHostedZoneApi(); } }
private ResourceRecordSetApi api(String zoneId) { return api.getResourceRecordSetApiForHostedZone(zoneId); } }
public boolean apply(Change input) { Change change = api.getChange(input.getId()); return change != null && change.getStatus() == INSYNC; } }, 600, 1, 5, SECONDS);
protected HostedZoneApi api() { return api.getHostedZoneApi(); } }
private ResourceRecordSetApi api(String zoneId) { return api.getResourceRecordSetApiForHostedZone(zoneId); } }
public boolean apply(Change input) { Change change = api.getChange(input.getId()); return change != null && change.getStatus() == INSYNC; } }, 600, 1, 5, SECONDS);
public void testDeleteWhenResponseIs404() { Route53Api fail = requestSendsResponse(delete, notFound); assertNull(fail.getHostedZoneApi().delete("Z1XTHCPEFRWV1X")); } }
@Test(expectedExceptions = ResourceNotFoundException.class) public void testListWhenResponseIs404() { Route53Api fail = requestSendsResponse(list, notFound); assertEquals(fail.getResourceRecordSetApiForHostedZone("Z1PA6795UKMFR9").list().get(0).toSet(), ImmutableSet.of()); }