Package com.yahoo.jdisc.test
Interface ServerProviderConformanceTest.Adapter<T extends ServerProvider,U,V>
- Type Parameters:
T
- TheServerProvider
under test.U
- An object that represents a remote client that can connect to the server.V
- An object that holds the response generated by the client when executing a request.
- Enclosing class:
- ServerProviderConformanceTest
public static interface ServerProviderConformanceTest.Adapter<T extends ServerProvider,U,V>
This interface declares the adapter between the general conformance test and an actual ServerProvider
implementation. Every test runs as follows:
newConfigModule()
is called to bind server-specific configuration.getServerProviderClass()
is called, and guice is asked to construct an instance of that class.newClient(ServerProvider)
is called one or more times as required by the test case.executeRequest(Object, boolean)
is called one or more times per client, as required by the test case.validateResponse(Object)
is called once per call toexecuteRequest(Object, boolean)
.
-
Method Summary
Modifier and TypeMethodDescriptiondefault AutoCloseable
executeRequest
(U client, boolean withRequestContent) com.google.inject.Module
void
validateResponse
(V response)
-
Method Details
-
newConfigModule
com.google.inject.Module newConfigModule() -
getServerProviderClass
-
newClient
- Throws:
Throwable
-
executeRequest
- Throws:
Throwable
-
newResponseContent
Iterable<ByteBuffer> newResponseContent() -
validateResponse
- Throws:
Throwable
-
configureServerProvider
-