瀏覽代碼

new test implementation

Ailton Mizuki Sato 9 年之前
父節點
當前提交
13bf3a8465

+ 3 - 4
config.properties

@@ -1,9 +1,8 @@
1 1
 
2
+domain = http://50.30.37.180:38080/snail/
2 3
 
3
-#domain = http://50.30.37.180:38080/snail/
4
+#domain= http://localhost:8080/Servlet/
4 5
 
5
-#domain= http://localhost:8080/snail/
6
-
7
-domain= http://localhost:7000/Servlet/
6
+#domain= http://localhost:7000/Servlet/
8 7
 
9 8
 

+ 5 - 11
src/test/Start.java

@@ -23,7 +23,7 @@ import test.servlet.user.post.TestUpdateUser;
23 23
 
24 24
 /**This is the started from tests*/
25 25
 public class Start {
26
-	
26
+
27 27
 	private static List<ServletTest> generateList()
28 28
 	{
29 29
 		List<ServletTest> tests = new ArrayList<ServletTest>();
@@ -34,11 +34,11 @@ public class Start {
34 34
 		tests.add(new TestGetCategories());
35 35
 		tests.add(new TestSearch());
36 36
 
37
-
38 37
 		tests.add(new TestCreateCategory());
39 38
 		tests.add(new TestSetCategory());
40 39
 		tests.add(new TestDeleteCategory());
41 40
 		tests.add(new TestDeleteItem());
41
+		tests.add(new TestCreateItem());
42 42
 		tests.add(new TestUpdateCategory());
43 43
 		tests.add(new TestUpdateItem());
44 44
 
@@ -46,17 +46,16 @@ public class Start {
46 46
 		tests.add(new TestCreateUser());
47 47
 		tests.add(new TestLogin());
48 48
 		tests.add(new TestUpdateUser());
49
-		tests.add(new TestCreateItem());
49
+	
50 50
 
51 51
 
52 52
 		return tests;
53 53
 	}
54 54
 
55 55
 
56
+
56 57
 	public static void main (String [] args){
57 58
 
58
-		
59
-		
60 59
 		List<ServletTest> tests = generateList();
61 60
 
62 61
 		for(ServletTest test : tests)
@@ -68,19 +67,14 @@ public class Start {
68 67
 		{
69 68
 			System.out.println(test);
70 69
 		}
71
-		
72
-		
70
+
73 71
 		for(ServletTest test:tests)
74 72
 		{
75 73
 			System.out.println(test.getUrl());
76 74
 		}
77 75
 
78 76
 
79
-
80
-
81 77
 	}
82 78
 
83 79
 
84
-
85
-
86 80
 }

+ 2 - 4
src/test/servlet/event/get/TestImportDataFacebook.java

@@ -4,14 +4,12 @@ import test.resource.ServletTestGet;
4 4
 
5 5
 public class TestImportDataFacebook extends ServletTestGet{
6 6
 
7
-
8
-
7
+	
9 8
 	@Override
10 9
 	public String buildUrl() {
11
-	
12 10
 		
13 11
 		return "data?method=import_data&"
14
-				+ "token=CAACEdEose0cBAIaFqPHYmsZAQHJnWwCZBJtXAODpUlRKJhvfM5nnRHnZCpdeYvKz2UIvGldXOZAXP3a70mImv69TmlGPOLuxQrUKNNUaf0G8pb2wiNfR6kYCh0SIPZBDV1UJFMIuejoZCvmNbB1LkmviEIArFALrDE9nER1MZAazKYSAgT2ExYmEZAesuTG2lZAagss1HmJiLht8U2Khnzg70"
12
+				+ "token=CAACEdEose0cBAFYW8HLIlYhwmZCsvm9A6X7q8NzsCUN8ov8P6wKtNe1ya8U89OyZA8y6CUWhNHaWlzAqlWOR92J7Ojstaxi4jgt9C8LAcOu3qLeikyBBzwFAjiYjC5jnIZCro0MNR8N6WrCFtqLCsD7PcSWAw3UrkHXUmNmh2rvd9AgQ1OiwuZAVcjkz2SRhtqEuPLFZBfgZDZD"
15 13
 				+ "&type=Facebook&quantity=14&user_id=1";
16 14
 	}
17 15
 	

+ 7 - 1
src/test/servlet/event/post/TestDeleteItem.java

@@ -10,8 +10,14 @@ public class TestDeleteItem extends ServletTestPost {
10 10
 
11 11
 	@Override
12 12
 	public Map<String, String> buildParameters() {
13
+		
14
+		TestCreateItem item = new  TestCreateItem();
15
+		item.runTest();
16
+		String id = new Integer(item.getId()).toString();
17
+		
13 18
 		Map<String, String> map = new HashMap<String, String>();
14
-		map.put("item_id", "120");
19
+		map.put("item_id", id);
20
+		
15 21
 		
16 22
 		return map;
17 23
 	}