File tree Expand file tree Collapse file tree 2 files changed +6
-36
lines changed
__test/src/test/java/features Expand file tree Collapse file tree 2 files changed +6
-36
lines changed Original file line number Diff line number Diff line change 1515 */
1616package features ;
1717
18+ import org .junit .jupiter .api .Assertions ;
1819import org .junit .jupiter .api .Test ;
1920import org .noear .snack .ONode ;
2021import org .noear .solon .net .http .HttpResponse ;
@@ -73,15 +74,7 @@ public void test_body2() throws Exception {
7374 System .out .println ("code: " + resp .code ());
7475 System .out .println ("body: " + resp .bodyAsString ());
7576
76- assert resp .code () == 413 ;
77-
78- // String resp_body = resp.bodyAsString();
79- // if (resp_body.contains("IOException")) {
80- // assert true;
81- // return;
82- // }
83- //
84- // assert false;
77+ Assertions .assertEquals (413 , resp .code ());
8578 }
8679
8780 @ Test
@@ -129,14 +122,6 @@ public void test_form2() throws Exception {
129122 System .out .println ("code: " + resp .code ());
130123 System .out .println ("body: " + resp .bodyAsString ());
131124
132- assert resp .code () == 413 ;
133-
134- // String resp_body = resp.bodyAsString();
135- // if (resp_body.contains("IOException") || resp_body.contains("HTTP ERROR 400 Unable to parse form content")) {
136- // assert true;
137- // return;
138- // }
139- //
140- // assert false;
125+ Assertions .assertEquals (413 , resp .code ());
141126 }
142127}
Original file line number Diff line number Diff line change 1515 */
1616package features ;
1717
18+ import org .junit .jupiter .api .Assertions ;
1819import org .junit .jupiter .api .Test ;
1920import org .noear .snack .ONode ;
2021import org .noear .solon .net .http .HttpResponse ;
@@ -73,15 +74,7 @@ public void test_body2() throws Exception {
7374 System .out .println ("code: " + resp .code ());
7475 System .out .println ("body: " + resp .bodyAsString ());
7576
76- assert resp .code () == 413 ;
77-
78- // String resp_body = resp.bodyAsString();
79- // if (resp_body.contains("IOException")) {
80- // assert true;
81- // return;
82- // }
83- //
84- // assert false;
77+ Assertions .assertEquals (413 , resp .code ());
8578 }
8679
8780 @ Test
@@ -130,14 +123,6 @@ public void test_form2() throws Exception {
130123 System .out .println ("code: " + resp .code ());
131124 System .out .println ("body: " + resp .bodyAsString ());
132125
133- assert resp .code () == 413 ;
134-
135- // String resp_body = resp.bodyAsString();
136- // if (resp_body.contains("IOException") || resp_body.contains("HTTP ERROR 400 Unable to parse form content")) {
137- // assert true;
138- // return;
139- // }
140- //
141- // assert false;
126+ Assertions .assertEquals (413 , resp .code ());
142127 }
143128}
You can’t perform that action at this time.
0 commit comments