File tree Expand file tree Collapse file tree
main/java/com/baeldung/servlets
test/java/com/baeldung/servlets Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
55 <modelVersion >4.0.0</modelVersion >
66
7- <groupId >com.root </groupId >
8- <artifactId >ServletmavenExample </artifactId >
7+ <groupId >com.baeldung </groupId >
8+ <artifactId >javax-servlets </artifactId >
99 <version >1.0-SNAPSHOT</version >
10+
1011 <build >
1112 <plugins >
1213 <plugin >
File renamed without changes.
Original file line number Diff line number Diff line change 11package com .baeldung .servlets ;
22
3+ import static org .junit .Assert .assertEquals ;
4+
5+ import java .util .ArrayList ;
6+ import java .util .List ;
7+
38import org .apache .http .HttpResponse ;
49import org .apache .http .client .HttpClient ;
510import org .apache .http .client .entity .UrlEncodedFormEntity ;
813import org .apache .http .message .BasicNameValuePair ;
914import org .junit .Test ;
1015
11- import java .util .ArrayList ;
12- import java .util .List ;
13-
14- import static org .junit .Assert .assertEquals ;
15-
1616public class FormServletLiveTest {
1717
1818 @ Test
@@ -25,7 +25,6 @@ public void whenPostRequestUsingHttpClient_thenCorrect() throws Exception {
2525 nvps .add (new BasicNameValuePair ("height" , String .valueOf (2 )));
2626 nvps .add (new BasicNameValuePair ("weight" , String .valueOf (80 )));
2727
28-
2928 method .setEntity (new UrlEncodedFormEntity (nvps ));
3029 HttpResponse httpResponse = client .execute (method );
3130
Original file line number Diff line number Diff line change 9797 <commons-dbcp2 .version>2.1.1</commons-dbcp2 .version>
9898 <log4j-core .version>2.7</log4j-core .version>
9999 <junit .version>4.12</junit .version>
100+
100101 <maven-compiler-plugin .version>3.6.0</maven-compiler-plugin .version>
102+ <maven-surefire-plugin .version>2.19.1</maven-surefire-plugin .version>
101103 </properties >
104+
102105</project >
You can’t perform that action at this time.
0 commit comments