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

Method test

cat-home/src/test/java/com/dianping/cat/TestApi.java:57–81  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

55 }
56
57 @Test
58 public void test() {
59 List<Item> items = new ArrayList<Item>();
60 for (int i = 1; i < 711; i++) {
61 try {
62 String url1 = build711Url(i);
63 String url2 = build720Url(i);
64
65 Pair<Integer, Double> pair1 = parse(fetchContent(url1));
66 Pair<Integer, Double> pair2 = parse(fetchContent(url2));
67
68 Item item = new Item();
69
70 item.setId(i);
71 item.setCount1(pair1.getKey());
72 item.setAvg1(pair1.getValue());
73 item.setCount2(pair2.getKey());
74 item.setAvg2(pair2.getValue());
75
76 items.add(item);
77 System.out.print(item.toString());
78 } catch (Exception e) {
79 }
80 }
81 }
82
83 private class Item {
84 private int m_id;

Callers 15

TabManagerFunction · 0.45
jquery-1.7.1.jsFile · 0.45
dataAttrFunction · 0.45
quickIsFunction · 0.45
SizzleFunction · 0.45
winnowFunction · 0.45
buildParamsFunction · 0.45
ajaxHandleResponsesFunction · 0.45
doAnimationFunction · 0.45

Calls 14

build711UrlMethod · 0.95
build720UrlMethod · 0.95
parseMethod · 0.95
fetchContentMethod · 0.95
setIdMethod · 0.95
setCount1Method · 0.95
setAvg1Method · 0.95
setCount2Method · 0.95
setAvg2Method · 0.95
toStringMethod · 0.95
addMethod · 0.65
getKeyMethod · 0.45

Tested by

no test coverage detected