|
@@ -10,10 +10,7 @@ import org.testng.annotations.BeforeClass;
|
|
|
import org.testng.annotations.Test;
|
|
|
import util.JDBCUtils;
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Locale;
|
|
|
+import java.util.*;
|
|
|
|
|
|
import static org.testng.Assert.*;
|
|
|
|
|
@@ -417,6 +414,12 @@ public class PolicyPageTest {
|
|
|
assertEquals((int)response.path("code"),200);
|
|
|
assertEquals(response.path("message"),"操作成功");
|
|
|
ArrayList<HashMap<String,Object>> projectsList2=response.path("data");
|
|
|
+ Collections.sort(projectsList2, new Comparator<HashMap<String, Object>>() {
|
|
|
+ @Override
|
|
|
+ public int compare(HashMap<String, Object> o1, HashMap<String, Object> o2) {
|
|
|
+ return Integer.compare(Integer.parseInt(""+o1.get("declareDate")),Integer.parseInt(""+o2.get("declareDate")));
|
|
|
+ }
|
|
|
+ });
|
|
|
for(int i=0;i<projectsList1.size();i++){
|
|
|
if((Integer) projectsList1.get(i).get("remainDay")<=0){
|
|
|
assertEquals(projectsList2.get(i).get("declareDate"),"已截止");
|