/** * Tests parsing all possible XML elements that could be encountered by {@link ListAlarmsForMetricResponseHandler}. * * @throws Exception if something goes wrong */ public void testParseFullResponse() throws Exception { Iterable<Alarm> metricAlarms = factory.create(injector.getInstance(ListAlarmsForMetricResponseHandler.class)) .parse(getClass().getResourceAsStream("/DescribeAlarmsForMetricResponse.xml")); assertEquals(metricAlarms.toString(), expected().toString()); }
); assertEquals(new ListAlarmsForMetricResponseHandlerTest().expected().toString(), cloudWatchApi.getAlarmApiForRegion(null) .listForMetric(new ListAlarmsForMetric()
); assertEquals(new ListAlarmsForMetricResponseHandlerTest().expected().toString(), cloudWatchApi.getAlarmApiForRegion(null) .listForMetric(new ListAlarmsForMetric()
/** * Tests parsing all possible XML elements that could be encountered by {@link ListAlarmsForMetricResponseHandler}. * * @throws Exception if something goes wrong */ public void testParseFullResponse() throws Exception { Iterable<Alarm> metricAlarms = factory.create(injector.getInstance(ListAlarmsForMetricResponseHandler.class)) .parse(getClass().getResourceAsStream("/DescribeAlarmsForMetricResponse.xml")); assertEquals(metricAlarms.toString(), expected().toString()); }