@Test public void testGetGraphiteQueryWithOnlyNullResultFromJson() throws MissingDatapointException { List<GraphiteResult> graphiteResults = readGraphiteFile("tests/invalidGraphiteResponse.json"); for (GraphiteResult graphiteResult : graphiteResults) { try { graphiteResult.getDatapoint(); } catch (MissingDatapointException e) { assertTrue(true); } } }
public Datapoint getDatapoint() throws MissingDatapointException { Double value; long timestamp; for (int i = 0; i < this.datapoints.length; i++) { if (datapoints[i][0] == null) continue; value = Double.parseDouble(datapoints[i][0]); timestamp = Long.parseLong(datapoints[i][1]); return new Datapoint(value, timestamp); } throw new MissingDatapointException(); }
GraphiteResult { public Datapoint getDatapoint() throws MissingDatapointException { Double value; long timestamp; for (int i = 0; i < this.datapoints.length; i++) { if (datapoints[i][0] == null) continue; value = Double.parseDouble(datapoints[i][0]); timestamp = Long.parseLong(datapoints[i][1]); return new Datapoint(value, timestamp); } throw new MissingDatapointException(); } }
GraphiteResult { public Datapoint getDatapoint() throws MissingDatapointException { Double value; long timestamp; for (int i = 0; i < this.datapoints.length; i++) { if (datapoints[i][0] == null) continue; value = Double.parseDouble(datapoints[i][0]); timestamp = Long.parseLong(datapoints[i][1]); return new Datapoint(value, timestamp); } throw new MissingDatapointException(); }  }
GraphiteResult { public Datapoint getDatapoint() throws MissingDatapointException { Double value; long timestamp; for (int i = 0; i < this.datapoints.length; i++) { if (datapoints[i][0] == null) continue; value = Double.parseDouble(datapoints[i][0]); timestamp = Long.parseLong(datapoints[i][1]); return new Datapoint(value, timestamp); } throw new MissingDatapointException(); }  Datapoint getDatapoint(); }
GraphiteResult { public Datapoint getDatapoint() throws MissingDatapointException { Double value; long timestamp; for (int i = 0; i < this.datapoints.length; i++) { if (datapoints[i][0] == null) continue; value = Double.parseDouble(datapoints[i][0]); timestamp = Long.parseLong(datapoints[i][1]); return new Datapoint(value, timestamp); } throw new MissingDatapointException(); }  Datapoint getDatapoint();  }