@Test public void testElementsEqual() { IterableWithMarker<String> initial = IterableWithMarkers.from(ImmutableSet.of("foo", "bar")); Assert.assertEquals(initial.toSet(), ImmutableSet.of("foo", "bar")); Assert.assertEquals(initial.nextMarker(), Optional.absent()); }
@Test public void testMarkerEqual() { IterableWithMarker<String> initial = IterableWithMarkers.from(ImmutableSet.of("foo", "bar"), "MARKER"); Assert.assertEquals(initial.toSet(), ImmutableSet.of("foo", "bar")); Assert.assertEquals(initial.nextMarker(), Optional.of("MARKER")); } }
@Test public void testMarkerEqual() { IterableWithMarker<String> initial = IterableWithMarkers.from(ImmutableSet.of("foo", "bar"), "MARKER"); Assert.assertEquals(initial.toSet(), ImmutableSet.of("foo", "bar")); Assert.assertEquals(initial.nextMarker(), Optional.of("MARKER")); } }
@Test public void testElementsEqual() { IterableWithMarker<String> initial = IterableWithMarkers.from(ImmutableSet.of("foo", "bar")); Assert.assertEquals(initial.toSet(), ImmutableSet.of("foo", "bar")); Assert.assertEquals(initial.nextMarker(), Optional.absent()); }
@Test(expectedExceptions = ResourceNotFoundException.class) public void testListWhenResponseIs404() { Route53Api fail = requestSendsResponse(list, notFound); assertEquals(fail.getHostedZoneApi().list().get(0).toSet(), ImmutableSet.of()); }
@Test(expectedExceptions = ResourceNotFoundException.class) public void testListWhenResponseIs404() { Route53Api fail = requestSendsResponse(list, notFound); assertEquals(fail.getResourceRecordSetApiForHostedZone("Z1PA6795UKMFR9").list().get(0).toSet(), ImmutableSet.of()); }
@Test(expectedExceptions = ResourceNotFoundException.class) public void testListWhenResponseIs404() { Route53Api fail = requestSendsResponse(list, notFound); assertEquals(fail.getHostedZoneApi().list().get(0).toSet(), ImmutableSet.of()); }
@Test(expectedExceptions = ResourceNotFoundException.class) public void testListWhenResponseIs404() { Route53Api fail = requestSendsResponse(list, notFound); assertEquals(fail.getResourceRecordSetApiForHostedZone("Z1PA6795UKMFR9").list().get(0).toSet(), ImmutableSet.of()); }
public void testListMetricsWhenResponseIs404() throws Exception { HttpResponse listMetricsResponse = HttpResponse.builder().statusCode(404).build(); CloudWatchApi apiWhenMetricsDontExist = requestSendsResponse( listMetrics, listMetricsResponse); assertEquals(apiWhenMetricsDontExist.getMetricApiForRegion(null).list().get(0).toSet(), ImmutableSet.of()); }
public void testListMetricsWhenResponseIs404() throws Exception { HttpResponse listMetricsResponse = HttpResponse.builder().statusCode(404).build(); CloudWatchApi apiWhenMetricsDontExist = requestSendsResponse( listMetrics, listMetricsResponse); assertEquals(apiWhenMetricsDontExist.getMetricApiForRegion(null).list().get(0).toSet(), ImmutableSet.of()); }