|
@@ -18,11 +18,13 @@ public class ReportTest { |
|
@@ -18,11 +18,13 @@ public class ReportTest { |
18
|
private static final String URL_REPORT_SCORE = Constants.URL_PREFIX + "/report/score";
|
18
|
private static final String URL_REPORT_SCORE = Constants.URL_PREFIX + "/report/score";
|
19
|
private static final String URL_ITEM_INFO = Constants.URL_PREFIX + "/report/itemInfo";
|
19
|
private static final String URL_ITEM_INFO = Constants.URL_PREFIX + "/report/itemInfo";
|
20
|
private static final String URL_ITEM_GRAPH = Constants.URL_PREFIX + "/report/itemGraph";
|
20
|
private static final String URL_ITEM_GRAPH = Constants.URL_PREFIX + "/report/itemGraph";
|
|
|
21
|
+ private static final String URL_COMPARE = Constants.URL_PREFIX + "/report/compare";
|
21
|
private static String token;
|
22
|
private static String token;
|
22
|
|
23
|
|
23
|
@BeforeClass
|
24
|
@BeforeClass
|
24
|
public static void init(){
|
25
|
public static void init(){
|
25
|
token = loginAndGetToken("user1","pass1");
|
26
|
token = loginAndGetToken("user1","pass1");
|
|
|
27
|
+// String token =OpenIdTest.bindWithOpenIdAndLoginAndGetToken("abcdefghijklmnopqrstuvwxyz123456","0");
|
26
|
}
|
28
|
}
|
27
|
|
29
|
|
28
|
/**
|
30
|
/**
|
|
@@ -119,13 +121,12 @@ public class ReportTest { |
|
@@ -119,13 +121,12 @@ public class ReportTest { |
119
|
*/
|
121
|
*/
|
120
|
@Test
|
122
|
@Test
|
121
|
public void testCompare(){
|
123
|
public void testCompare(){
|
122
|
- String token =OpenIdTest.bindWithOpenIdAndLoginAndGetToken("abcdefghijklmnopqrstuvwxyz123456","0");
|
|
|
123
|
Map<String,String> params = new HashMap<String, String>();
|
124
|
Map<String,String> params = new HashMap<String, String>();
|
124
|
params.put("report_id","77");
|
125
|
params.put("report_id","77");
|
125
|
params.put("t",HttpTools.getNow());
|
126
|
params.put("t",HttpTools.getNow());
|
126
|
params.put("type","1");
|
127
|
params.put("type","1");
|
127
|
params.put("sign",HttpTools.getSign(params));
|
128
|
params.put("sign",HttpTools.getSign(params));
|
128
|
- String response = HttpTools.requestByMapWithToken(OpenIdTest.URL_COMPARE,"POST",params,token);
|
129
|
+ String response = HttpTools.requestByMapWithToken(URL_COMPARE,"POST",params,token);
|
129
|
System.out.println(response);
|
130
|
System.out.println(response);
|
130
|
}
|
131
|
}
|
131
|
} |
132
|
} |