Versions update (#2234)
* Mockito refactor * Httpclient refactor * Refactor json-path * MongoDB Refactor
This commit is contained in:
committed by
GitHub
parent
1957750382
commit
9ad123a655
@@ -1,24 +1,24 @@
|
||||
package com.baeldung.servlets;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.apache.http.client.HttpClient;
|
||||
import org.apache.http.client.entity.UrlEncodedFormEntity;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.impl.client.DefaultHttpClient;
|
||||
import org.apache.http.impl.client.HttpClientBuilder;
|
||||
import org.apache.http.message.BasicNameValuePair;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class FormServletLiveTest {
|
||||
|
||||
@Test
|
||||
public void whenPostRequestUsingHttpClient_thenCorrect() throws Exception {
|
||||
|
||||
HttpClient client = new DefaultHttpClient();
|
||||
HttpClient client = HttpClientBuilder.create().build();
|
||||
HttpPost method = new HttpPost("http://localhost:8080/calculateServlet");
|
||||
|
||||
List<BasicNameValuePair> nvps = new ArrayList<>();
|
||||
|
||||
Reference in New Issue
Block a user