Versions update (#2234)

* Mockito refactor

* Httpclient refactor

* Refactor json-path

* MongoDB Refactor
This commit is contained in:
Grzegorz Piwowarek
2017-07-09 06:27:31 +02:00
committed by GitHub
parent 1957750382
commit 9ad123a655
23 changed files with 141 additions and 148 deletions
@@ -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<>();