Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Decoupling from HttpTester, Introducing InProcResponse

  • Loading branch information...
commit 977c08c6d0b3ecfa764a73926aa6dcda0caf0af7 1 parent 313410e
@aharin authored
Showing with 173 additions and 120 deletions.
  1. +1 −1  inproctester-core/src/main/java/com/thoughtworks/inproctester/core/InProcConnection.java
  2. +17 −3 inproctester-core/src/main/java/com/thoughtworks/inproctester/core/InProcRequest.java
  3. +17 −0 inproctester-core/src/main/java/com/thoughtworks/inproctester/core/InProcResponse.java
  4. +1 −1  ...nproctester/jetty → inproctester-core/src/main/java/com/thoughtworks/inproctester/core}/UrlHelper.java
  5. +1 −1  inproctester-htmlunit/pom.xml
  6. +2 −2 inproctester-htmlunit/src/main/java/com/thoughtworks/inproctester/htmlunit/HtmlUnitInprocRequest.java
  7. +11 −13 inproctester-htmlunit/src/main/java/com/thoughtworks/inproctester/htmlunit/HttpTesterAdaptor.java
  8. +17 −16 inproctester-htmlunit/src/main/java/com/thoughtworks/inproctester/htmlunit/InProcessWebConnection.java
  9. +1 −1  inproctester-htmlunit/src/main/java/com/thoughtworks/inproctester/htmlunit/UrlEncodedContent.java
  10. +15 −21 inproctester-jersey/src/main/java/com/thoughtworks/inproctester/jersey/InPocessClientHandler.java
  11. +3 −2 inproctester-jetty/src/main/java/com/thoughtworks/inproctester/jetty/HttpAppTester.java
  12. +0 −30 inproctester-jetty/src/main/java/com/thoughtworks/inproctester/jetty/HttpAppTesterExtensions.java
  13. +51 −0 inproctester-jetty/src/main/java/com/thoughtworks/inproctester/jetty/JettyInProcResponse.java
  14. +10 −3 inproctester-jetty/src/main/java/com/thoughtworks/inproctester/jetty/LocalConnection.java
  15. +1 −2  inproctester-jetty/src/test/java/com/thoughtworks/inproctester/jetty/UrlHelperTest.java
  16. +13 −18 inproctester-resteasy/src/main/java/com/thoughtworks/inproctester/resteasy/InProcessClientExecutor.java
  17. +2 −2 inproctester-resteasy/src/main/java/com/thoughtworks/inproctester/resteasy/RestEasyClientInProcRequest.java
  18. +4 −4 inproctester-resteasy/src/main/java/com/thoughtworks/inproctester/resteasy/TesterRoute.java
  19. +6 −0 inproctester-tests/pom.xml
View
2  inproctester-core/src/main/java/com/thoughtworks/inproctester/core/InProcConnection.java
@@ -15,5 +15,5 @@
package com.thoughtworks.inproctester.core;
public interface InProcConnection {
- String getResponses(InProcRequest rawRequests);
+ InProcResponse getResponses(InProcRequest inProcRequest);
}
View
20 inproctester-core/src/main/java/com/thoughtworks/inproctester/core/InProcRequest.java
@@ -1,3 +1,17 @@
+/* Copyright 2012 ThoughtWorks Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package com.thoughtworks.inproctester.core;
import java.net.URI;
@@ -8,11 +22,11 @@
URI getUri();
- String getFormData();
-
- String getHeader(String headerName);
+ String getContent();
Set<String> getHeaderNames();
+ String getHeader(String headerName);
+
void addHeader(String headerName, String header);
}
View
17 inproctester-core/src/main/java/com/thoughtworks/inproctester/core/InProcResponse.java
@@ -0,0 +1,17 @@
+package com.thoughtworks.inproctester.core;
+
+import java.util.Set;
+
+public interface InProcResponse {
+ int getStatus();
+
+ String getContent();
+
+ Set<String> getHeaderNames();
+
+ String getHeader(String headerName);
+
+ String getCharacterEncoding();
+
+ String getReason();
+}
View
2  ...om/thoughtworks/inproctester/jetty/UrlHelper.java → ...com/thoughtworks/inproctester/core/UrlHelper.java
@@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.thoughtworks.inproctester.jetty;
+package com.thoughtworks.inproctester.core;
import java.io.UnsupportedEncodingException;
import java.net.URI;
View
2  inproctester-htmlunit/pom.xml
@@ -16,7 +16,7 @@
<dependency>
<groupId>com.thoughtworks.inproctester</groupId>
- <artifactId>inproctester-jetty</artifactId>
+ <artifactId>inproctester-core</artifactId>
<version>1.0.13-SNAPSHOT</version>
</dependency>
View
4 inproctester-htmlunit/src/main/java/com/thoughtworks/inproctester/htmlunit/HtmlUnitInprocRequest.java
@@ -2,7 +2,7 @@
import com.gargoylesoftware.htmlunit.WebRequest;
import com.thoughtworks.inproctester.core.InProcRequest;
-import com.thoughtworks.inproctester.jetty.UrlHelper;
+import com.thoughtworks.inproctester.core.UrlHelper;
import java.net.URI;
import java.net.URISyntaxException;
@@ -36,7 +36,7 @@ public URI getUri() {
}
@Override
- public String getFormData() {
+ public String getContent() {
return new UrlEncodedContent(request.getRequestParameters()).generateFormDataAsString();
}
View
24 inproctester-htmlunit/src/main/java/com/thoughtworks/inproctester/htmlunit/HttpTesterAdaptor.java
@@ -18,26 +18,24 @@
import com.gargoylesoftware.htmlunit.WebResponseData;
import com.gargoylesoftware.htmlunit.util.NameValuePair;
import com.thoughtworks.inproctester.core.InProcRequest;
-import org.eclipse.jetty.testing.HttpTester;
+import com.thoughtworks.inproctester.core.InProcResponse;
import java.io.IOException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
public class HttpTesterAdaptor {
- static WebResponseData adaptResponse(HttpTester httpTester) throws IOException {
+ static WebResponseData adaptResponse(InProcResponse inProcResponse) throws IOException {
final List<NameValuePair> headers = new ArrayList<NameValuePair>();
- Enumeration headerNames = httpTester.getHeaderNames();
- while (headerNames.hasMoreElements()) {
- String headerName = headerNames.nextElement().toString();
- Enumeration headerValues = httpTester.getHeaderValues(headerName);
- while (headerValues.hasMoreElements()) {
- String headerValue = headerValues.nextElement().toString();
- headers.add(new NameValuePair(headerName, headerValue));
- }
+ Set<String> headerNames = inProcResponse.getHeaderNames();
+ for (String headerName : headerNames) {
+ String headerValue = inProcResponse.getHeader(headerName);
+ headers.add(new NameValuePair(headerName, headerValue));
}
- String content = httpTester.getContent();
+ String content = inProcResponse.getContent();
if (content == null) content = "";
- return new WebResponseData(content.getBytes(httpTester.getCharacterEncoding()), httpTester.getStatus(), httpTester.getReason(), headers);
+ return new WebResponseData(content.getBytes(inProcResponse.getCharacterEncoding()), inProcResponse.getStatus(), inProcResponse.getReason(), headers);
}
static InProcRequest adaptRequest(WebRequest request) {
View
33 inproctester-htmlunit/src/main/java/com/thoughtworks/inproctester/htmlunit/InProcessWebConnection.java
@@ -14,19 +14,24 @@
*/
package com.thoughtworks.inproctester.htmlunit;
-import com.gargoylesoftware.htmlunit.*;
+import com.gargoylesoftware.htmlunit.CookieManager;
+import com.gargoylesoftware.htmlunit.WebConnection;
+import com.gargoylesoftware.htmlunit.WebRequest;
+import com.gargoylesoftware.htmlunit.WebResponse;
import com.gargoylesoftware.htmlunit.util.Cookie;
import com.thoughtworks.inproctester.core.InProcConnection;
import com.thoughtworks.inproctester.core.InProcRequest;
+import com.thoughtworks.inproctester.core.InProcResponse;
import org.apache.commons.lang.StringUtils;
-import org.eclipse.jetty.testing.HttpTester;
import java.io.IOException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Set;
import static com.thoughtworks.inproctester.htmlunit.HttpTesterAdaptor.adaptRequest;
import static com.thoughtworks.inproctester.htmlunit.HttpTesterAdaptor.adaptResponse;
-import static com.thoughtworks.inproctester.jetty.HttpAppTesterExtensions.processRequest;
public class InProcessWebConnection implements WebConnection {
private CookieManager cookieManager;
@@ -43,23 +48,19 @@ public WebResponse getResponse(WebRequest webRequest) throws IOException {
return new WebResponse(adaptResponse(processTesterRequest(adaptRequest(webRequest))), webRequest, 0);
}
- private HttpTester processTesterRequest(InProcRequest inProcRequest) throws IOException {
+ private InProcResponse processTesterRequest(InProcRequest inProcRequest) throws IOException {
addCookiesToRequest(inProcRequest);
- HttpTester testerResponse = processRequest(inProcConnection, inProcRequest);
- storeCookiesFromResponse(inProcRequest, testerResponse);
- return testerResponse;
+ InProcResponse inProcResponse = inProcConnection.getResponses(inProcRequest);
+ storeCookiesFromResponse(inProcRequest, inProcResponse);
+ return inProcResponse;
}
- private void storeCookiesFromResponse(InProcRequest testerRequest, HttpTester testerResponse) {
+ private void storeCookiesFromResponse(InProcRequest testerRequest, InProcResponse inProcResponse) {
String requestHostName = testerRequest.getHeader("Host").split(":", 1)[0];
- Enumeration headerNames = testerResponse.getHeaderNames();
- while (headerNames.hasMoreElements()) {
- String headerName = headerNames.nextElement().toString();
+ Set<String> headerNames = inProcResponse.getHeaderNames();
+ for (String headerName : headerNames) {
if ("Set-Cookie".equalsIgnoreCase(headerName)) {
- Enumeration headerValues = testerResponse.getHeaderValues(headerName);
- while (headerValues.hasMoreElements()) {
- storeCookie(requestHostName, headerValues.nextElement().toString());
- }
+ storeCookie(requestHostName, inProcResponse.getHeader(headerName));
}
}
}
View
2  inproctester-htmlunit/src/main/java/com/thoughtworks/inproctester/htmlunit/UrlEncodedContent.java
@@ -15,7 +15,7 @@
package com.thoughtworks.inproctester.htmlunit;
import com.gargoylesoftware.htmlunit.util.NameValuePair;
-import com.thoughtworks.inproctester.jetty.UrlHelper;
+import com.thoughtworks.inproctester.core.UrlHelper;
import org.apache.commons.lang.StringUtils;
import java.util.List;
View
36 inproctester-jersey/src/main/java/com/thoughtworks/inproctester/jersey/InPocessClientHandler.java
@@ -18,15 +18,17 @@
import com.sun.jersey.api.container.ContainerException;
import com.sun.jersey.core.header.InBoundHeaders;
import com.thoughtworks.inproctester.core.InProcRequest;
+import com.thoughtworks.inproctester.core.InProcResponse;
+import com.thoughtworks.inproctester.core.UrlHelper;
import com.thoughtworks.inproctester.jetty.HttpAppTester;
-import com.thoughtworks.inproctester.jetty.HttpAppTesterExtensions;
-import com.thoughtworks.inproctester.jetty.UrlHelper;
-import org.eclipse.jetty.testing.HttpTester;
import javax.ws.rs.core.MultivaluedMap;
import java.io.*;
import java.net.URI;
-import java.util.*;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
public class InPocessClientHandler extends TerminatingClientHandler {
private final HttpAppTester w;
@@ -38,12 +40,7 @@ public InPocessClientHandler(HttpAppTester appTester) {
public ClientResponse handle(ClientRequest clientRequest) {
final InProcRequest cRequest = new JerseyClientInprocRequest(clientRequest);
- HttpTester cResponse;
- try {
- cResponse = HttpAppTesterExtensions.processRequest(w, cRequest);
- } catch (IOException e) {
- throw new ContainerException(e);
- }
+ InProcResponse cResponse = w.getResponses(cRequest);
ClientResponse clientResponse;
try {
@@ -59,22 +56,19 @@ public ClientResponse handle(ClientRequest clientRequest) {
return clientResponse;
}
- private byte[] getContent(HttpTester cResponse) throws UnsupportedEncodingException {
+ private byte[] getContent(InProcResponse cResponse) throws UnsupportedEncodingException {
String contentString = cResponse.getContent();
if (contentString == null) contentString = "";
return contentString.getBytes(cResponse.getCharacterEncoding());
}
- private InBoundHeaders getInBoundHeaders(HttpTester httpTester) {
+ private InBoundHeaders getInBoundHeaders(InProcResponse inProcResponse) {
InBoundHeaders headers = new InBoundHeaders();
- Enumeration headerNames = httpTester.getHeaderNames();
- while (headerNames.hasMoreElements()) {
- String headerName = headerNames.nextElement().toString();
- Enumeration headerValues = httpTester.getHeaderValues(headerName);
- while (headerValues.hasMoreElements()) {
- String headerValue = headerValues.nextElement().toString();
- headers.add(headerName, headerValue);
- }
+ Set<String> headerNames = inProcResponse.getHeaderNames();
+
+ for (String headerName : headerNames) {
+ String headerValue = inProcResponse.getHeader(headerName);
+ headers.add(headerName, headerValue);
}
return headers;
}
@@ -101,7 +95,7 @@ public URI getUri() {
}
@Override
- public String getFormData() {
+ public String getContent() {
byte[] requestEntity = writeRequestEntity(clientRequest);
try {
View
5 inproctester-jetty/src/main/java/com/thoughtworks/inproctester/jetty/HttpAppTester.java
@@ -16,6 +16,7 @@
import com.thoughtworks.inproctester.core.InProcConnection;
import com.thoughtworks.inproctester.core.InProcRequest;
+import com.thoughtworks.inproctester.core.InProcResponse;
import org.eclipse.jetty.server.LocalConnector;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.handler.ErrorHandler;
@@ -129,7 +130,7 @@ public void stop() {
}
@Override
- public String getResponses(InProcRequest inProcRequest) {
- return localConnection.getResponses(inProcRequest);
+ public InProcResponse getResponses(InProcRequest inProcRequest) {
+ return localConnection.getResponses(inProcRequest);
}
}
View
30 inproctester-jetty/src/main/java/com/thoughtworks/inproctester/jetty/HttpAppTesterExtensions.java
@@ -1,30 +0,0 @@
-/* Copyright 2011 ThoughtWorks Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.thoughtworks.inproctester.jetty;
-
-import com.thoughtworks.inproctester.core.InProcConnection;
-import com.thoughtworks.inproctester.core.InProcRequest;
-import org.eclipse.jetty.testing.HttpTester;
-
-import java.io.IOException;
-
-public class HttpAppTesterExtensions {
- public static HttpTester processRequest(InProcConnection inProcConnection, InProcRequest testerRequest) throws IOException {
- String rawResponse = inProcConnection.getResponses(testerRequest);
- HttpTester testerResponse = new HttpTester();
- testerResponse.parse(rawResponse);
- return testerResponse;
- }
-}
View
51 inproctester-jetty/src/main/java/com/thoughtworks/inproctester/jetty/JettyInProcResponse.java
@@ -0,0 +1,51 @@
+package com.thoughtworks.inproctester.jetty;
+
+import com.thoughtworks.inproctester.core.InProcResponse;
+import org.eclipse.jetty.testing.HttpTester;
+
+import java.util.Enumeration;
+import java.util.HashSet;
+import java.util.Set;
+
+public class JettyInProcResponse implements InProcResponse {
+ private HttpTester httpTester;
+
+ public JettyInProcResponse(HttpTester httpTester) {
+ this.httpTester = httpTester;
+ }
+
+ @Override
+ public int getStatus() {
+ return httpTester.getStatus();
+ }
+
+ @Override
+ public String getContent() {
+ return httpTester.getContent();
+ }
+
+ @Override
+ public Set<String> getHeaderNames() {
+ Set<String> headerNames = new HashSet<String>();
+ Enumeration enumeration = httpTester.getHeaderNames();
+ while (enumeration.hasMoreElements()) {
+ headerNames.add(enumeration.nextElement().toString());
+ }
+ return headerNames;
+ }
+
+ @Override
+ public String getHeader(String headerName) {
+ return httpTester.getHeader(headerName);
+ }
+
+ @Override
+ public String getCharacterEncoding() {
+ return httpTester.getCharacterEncoding();
+ }
+
+ @Override
+ public String getReason() {
+ return httpTester.getReason();
+ }
+}
View
13 inproctester-jetty/src/main/java/com/thoughtworks/inproctester/jetty/LocalConnection.java
@@ -16,6 +16,8 @@
import com.thoughtworks.inproctester.core.InProcConnection;
import com.thoughtworks.inproctester.core.InProcRequest;
+import com.thoughtworks.inproctester.core.InProcResponse;
+import com.thoughtworks.inproctester.core.UrlHelper;
import org.eclipse.jetty.io.ByteArrayBuffer;
import org.eclipse.jetty.server.LocalConnector;
import org.eclipse.jetty.testing.HttpTester;
@@ -44,7 +46,7 @@ private String getResponses(String rawRequests) {
}
@Override
- public String getResponses(InProcRequest request) {
+ public InProcResponse getResponses(InProcRequest request) {
HttpTester httpTester = new HttpTester();
httpTester.setMethod(request.getHttpMethod());
httpTester.setURI(UrlHelper.getRequestPath(request.getUri()));
@@ -53,13 +55,18 @@ public String getResponses(InProcRequest request) {
}
if ("POST".equals(request.getHttpMethod())) {
- httpTester.setContent(request.getFormData());
+ httpTester.setContent(request.getContent());
}
try {
- return getResponses(httpTester.generate());
+ String rawResponse = getResponses(httpTester.generate());
+ HttpTester testerResponse = new HttpTester();
+ testerResponse.parse(rawResponse);
+ return new JettyInProcResponse(testerResponse);
} catch (IOException e) {
throw new RuntimeException(e);
}
+
+
}
}
View
3  inproctester-jetty/src/test/java/com/thoughtworks/inproctester/jetty/UrlHelperTest.java
@@ -1,7 +1,6 @@
package com.thoughtworks.inproctester.jetty;
-import org.hamcrest.MatcherAssert;
-import org.hamcrest.Matchers;
+import com.thoughtworks.inproctester.core.UrlHelper;
import org.junit.Test;
import java.net.URI;
View
31 inproctester-resteasy/src/main/java/com/thoughtworks/inproctester/resteasy/InProcessClientExecutor.java
@@ -1,10 +1,9 @@
package com.thoughtworks.inproctester.resteasy;
+import com.thoughtworks.inproctester.core.InProcConnection;
import com.thoughtworks.inproctester.core.InProcRequest;
-import com.thoughtworks.inproctester.jetty.HttpAppTester;
-import com.thoughtworks.inproctester.jetty.HttpAppTesterExtensions;
+import com.thoughtworks.inproctester.core.InProcResponse;
import org.eclipse.jetty.http.HttpException;
-import org.eclipse.jetty.testing.HttpTester;
import org.jboss.resteasy.client.ClientExecutor;
import org.jboss.resteasy.client.ClientRequest;
import org.jboss.resteasy.client.ClientResponse;
@@ -20,8 +19,8 @@
import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.util.ArrayList;
-import java.util.Enumeration;
import java.util.List;
+import java.util.Set;
public class InProcessClientExecutor implements ClientExecutor {
@@ -30,11 +29,11 @@
public InProcessClientExecutor() {
}
- public InProcessClientExecutor(final HttpAppTester httpAppTester) {
+ public InProcessClientExecutor(InProcConnection httpAppTester) {
addTesterRoute(new AnyRouteMatcher(), httpAppTester);
}
- public InProcessClientExecutor addTesterRoute(RouteMatcher routeMatcher, HttpAppTester tester) {
+ public InProcessClientExecutor addTesterRoute(RouteMatcher routeMatcher, InProcConnection tester) {
testerRoutes.add(new TesterRoute(routeMatcher, tester));
return this;
}
@@ -51,7 +50,7 @@ public ClientResponse execute(ClientRequest clientRequest) throws Exception {
final InProcRequest testerRequest = new RestEasyClientInProcRequest(clientRequest);
- final HttpTester testerResponse = HttpAppTesterExtensions.processRequest(routeToTesterApplication(testerRequest.getUri()), testerRequest);
+ final InProcResponse testerResponse = routeToTesterApplication(testerRequest.getUri()).getResponses(testerRequest);
BaseClientResponse<?> clientResponse = new BaseClientResponse(new BaseClientResponse.BaseClientResponseStreamFactory() {
InputStream stream;
@@ -77,7 +76,7 @@ public void performReleaseConnection() {
return clientResponse;
}
- private HttpAppTester routeToTesterApplication(URI requestUri) throws HttpException {
+ private InProcConnection routeToTesterApplication(URI requestUri) throws HttpException {
for (TesterRoute route : testerRoutes) {
if (route.matches(requestUri)) {
return route.getHttpAppTester();
@@ -87,23 +86,19 @@ private HttpAppTester routeToTesterApplication(URI requestUri) throws HttpExcept
}
- private byte[] getContent(HttpTester cResponse) throws UnsupportedEncodingException {
+ private byte[] getContent(InProcResponse cResponse) throws UnsupportedEncodingException {
String contentString = cResponse.getContent();
if (contentString == null) contentString = "";
return contentString.getBytes(cResponse.getCharacterEncoding());
}
- private MultivaluedMap<String, String> extractHeaders(HttpTester httpTester) {
+ private MultivaluedMap<String, String> extractHeaders(InProcResponse inProcResponse) {
final CaseInsensitiveMap<String> headers = new CaseInsensitiveMap<String>();
- Enumeration headerNames = httpTester.getHeaderNames();
- while (headerNames.hasMoreElements()) {
- String headerName = headerNames.nextElement().toString();
- Enumeration headerValues = httpTester.getHeaderValues(headerName);
- while (headerValues.hasMoreElements()) {
- String headerValue = headerValues.nextElement().toString();
- headers.add(headerName, headerValue);
- }
+ Set<String> headerNames = inProcResponse.getHeaderNames();
+ for (String headerName : headerNames) {
+ String headerValue = inProcResponse.getHeader(headerName);
+ headers.add(headerName, headerValue);
}
return headers;
}
View
4 inproctester-resteasy/src/main/java/com/thoughtworks/inproctester/resteasy/RestEasyClientInProcRequest.java
@@ -1,7 +1,7 @@
package com.thoughtworks.inproctester.resteasy;
import com.thoughtworks.inproctester.core.InProcRequest;
-import com.thoughtworks.inproctester.jetty.UrlHelper;
+import com.thoughtworks.inproctester.core.UrlHelper;
import org.jboss.resteasy.client.ClientRequest;
import javax.ws.rs.core.MultivaluedMap;
@@ -44,7 +44,7 @@ public URI getUri() {
}
@Override
- public String getFormData() {
+ public String getContent() {
try {
return new String(writeRequestEntity(clientRequest), "UTF-8");
} catch (UnsupportedEncodingException e) {
View
8 inproctester-resteasy/src/main/java/com/thoughtworks/inproctester/resteasy/TesterRoute.java
@@ -1,19 +1,19 @@
package com.thoughtworks.inproctester.resteasy;
-import com.thoughtworks.inproctester.jetty.HttpAppTester;
+import com.thoughtworks.inproctester.core.InProcConnection;
import java.net.URI;
public class TesterRoute {
private RouteMatcher routeMatcher;
- private HttpAppTester httpAppTester;
+ private InProcConnection httpAppTester;
- public TesterRoute(RouteMatcher routeMatcher, HttpAppTester httpAppTester) {
+ public TesterRoute(RouteMatcher routeMatcher, InProcConnection httpAppTester) {
this.routeMatcher = routeMatcher;
this.httpAppTester = httpAppTester;
}
- public HttpAppTester getHttpAppTester() {
+ public InProcConnection getHttpAppTester() {
return httpAppTester;
}
View
6 inproctester-tests/pom.xml
@@ -29,6 +29,12 @@
<version>1.0.13-SNAPSHOT</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>com.thoughtworks.inproctester</groupId>
+ <artifactId>inproctester-jetty</artifactId>
+ <version>1.0.13-SNAPSHOT</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
Please sign in to comment.
Something went wrong with that request. Please try again.