From: <rm...@hy...> - 2008-11-21 22:54:18
|
Author: rmorgan Date: 2008-11-21 14:54:15 -0800 (Fri, 21 Nov 2008) New Revision: 298 URL: http://svn.hyperic.org/?view=rev&root=HQApi&revision=298 Modified: trunk/src/org/hyperic/hq/hqapi1/test/MetricData_test.java Log: Add test for invalid ids for metric data. Modified: trunk/src/org/hyperic/hq/hqapi1/test/MetricData_test.java =================================================================== --- trunk/src/org/hyperic/hq/hqapi1/test/MetricData_test.java 2008-11-20 14:23:41 UTC (rev 297) +++ trunk/src/org/hyperic/hq/hqapi1/test/MetricData_test.java 2008-11-21 22:54:15 UTC (rev 298) @@ -54,6 +54,17 @@ } } + public void testGetMetricDataInvalidId() throws Exception { + + MetricApi api = getApi().getMetricApi(); + long end = System.currentTimeMillis(); + long start = end - (8 * 60 * 60 * 1000); + Metric m = new Metric(); + m.setId(Integer.MAX_VALUE); + GetMetricDataResponse dataResponse = api.getMetricData(m, start, end); + hqAssertFailureObjectNotFound(dataResponse); + } + public void testGetMetricDataInvalidRange() throws Exception { if (_r == null) { |