MCPcopy
hub / github.com/dianping/cat / parse

Method parse

cat-home/src/test/java/com/dianping/cat/TestApi.java:49–55  ·  view source on GitHub ↗
(String content)

Source from the content-addressed store, hash-verified

47 }
48
49 private Pair<Integer, Double> parse(String content) throws ParseException {
50 JsonObject obj = new JsonObject(content);
51 JsonArray array = obj.getJSONArray("lineChartDetails");
52 JsonObject chart = (JsonObject) array.get(0);
53
54 return new Pair<Integer, Double>(chart.getInt("accessNumberSum"), chart.getDouble("successRatio"));
55 }
56
57 @Test
58 public void test() {

Callers 1

testMethod · 0.95

Calls 4

getJSONArrayMethod · 0.95
getMethod · 0.95
getIntMethod · 0.95
getDoubleMethod · 0.95

Tested by

no test coverage detected