Search in sources :

Example 6 with CurrentContainer

use of com.yahoo.jdisc.service.CurrentContainer in project vespa by vespa-engine.

the class HttpRequestTestCase method mockContainer.

private static CurrentContainer mockContainer() {
    final CurrentContainer currentContainer = mock(CurrentContainer.class);
    when(currentContainer.newReference(any(URI.class))).thenReturn(mock(Container.class));
    return currentContainer;
}
Also used : Container(com.yahoo.jdisc.Container) CurrentContainer(com.yahoo.jdisc.service.CurrentContainer) URI(java.net.URI) CurrentContainer(com.yahoo.jdisc.service.CurrentContainer)

Example 7 with CurrentContainer

use of com.yahoo.jdisc.service.CurrentContainer in project vespa by vespa-engine.

the class EmptyRequestFilterTestCase method newRequest.

private static HttpRequest newRequest(final Method method, final String uri, final Version version) {
    final CurrentContainer currentContainer = mock(CurrentContainer.class);
    when(currentContainer.newReference(any(URI.class))).thenReturn(mock(Container.class));
    return HttpRequest.newServerRequest(currentContainer, URI.create(uri), method, version);
}
Also used : Container(com.yahoo.jdisc.Container) CurrentContainer(com.yahoo.jdisc.service.CurrentContainer) URI(java.net.URI) CurrentContainer(com.yahoo.jdisc.service.CurrentContainer)

Aggregations

CurrentContainer (com.yahoo.jdisc.service.CurrentContainer)7 Container (com.yahoo.jdisc.Container)5 URI (java.net.URI)5 Test (org.junit.Test)2 HttpRequest (com.yahoo.container.jdisc.HttpRequest)1 Method (com.yahoo.jdisc.http.HttpRequest.Method)1 Version (com.yahoo.jdisc.http.HttpRequest.Version)1 TestDriver (com.yahoo.jdisc.test.TestDriver)1 Query (com.yahoo.search.Query)1 Result (com.yahoo.search.Result)1 Searcher (com.yahoo.search.Searcher)1 Execution (com.yahoo.search.searchchain.Execution)1 ConnectionControlSearcher (com.yahoo.search.searchers.ConnectionControlSearcher)1 ByteArrayInputStream (java.io.ByteArrayInputStream)1 SocketAddress (java.net.SocketAddress)1 BundleContext (org.osgi.framework.BundleContext)1