/** * Tests parsing all possible XML elements that could be encountered by {@link ListAlarmsResponseHandler}. * * @throws Exception if something goes wrong */ public void testParseFullResponse() throws Exception { IterableWithMarker<Alarm> metricAlarms = factory.create(injector.getInstance(ListAlarmsResponseHandler.class)) .parse(getClass().getResourceAsStream("/DescribeAlarmsResponse.xml")); assertEquals(metricAlarms.toString(), expected().toString()); assertFalse(metricAlarms.nextMarker().isPresent()); }
); assertEquals(new ListAlarmsResponseHandlerTest().expected().toString(), cloudWatchApi.getAlarmApiForRegion(null) .list(new ListAlarmsOptions()
); assertEquals(new ListAlarmsResponseHandlerTest().expected().toString(), cloudWatchApi.getAlarmApiForRegion(null) .list(new ListAlarmsOptions()
/** * Tests parsing all possible XML elements that could be encountered by {@link ListAlarmsResponseHandler}. * * @throws Exception if something goes wrong */ public void testParseFullResponse() throws Exception { IterableWithMarker<Alarm> metricAlarms = factory.create(injector.getInstance(ListAlarmsResponseHandler.class)) .parse(getClass().getResourceAsStream("/DescribeAlarmsResponse.xml")); assertEquals(metricAlarms.toString(), expected().toString()); assertFalse(metricAlarms.nextMarker().isPresent()); }