Search in sources :

Example 1 with ArrayEndpoint

use of com.google.api.server.spi.testing.ArrayEndpoint in project endpoints-java by cloudendpoints.

the class EndpointsMethodHandlerTest method fail_findService.

@Test
public void fail_findService() throws Exception {
    EndpointMethod method = systemService.resolveService("TestEndpoint", "simple");
    ApiMethodConfig methodConfig = new ApiMethodConfig(method, typeLoader, apiConfig.getApiClassConfig());
    systemService = SystemService.builder().withDefaults(classLoader).addService(ArrayEndpoint.class, new ArrayEndpoint()).build();
    TestMethodHandler handler = new TestMethodHandler(ServletInitializationParameters.builder().build(), method, apiConfig, methodConfig, systemService, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, RESOURCE);
    handler.getRestHandler().handle(context);
}
Also used : ApiMethodConfig(com.google.api.server.spi.config.model.ApiMethodConfig) EndpointMethod(com.google.api.server.spi.EndpointMethod) ArrayEndpoint(com.google.api.server.spi.testing.ArrayEndpoint) Test(org.junit.Test)

Aggregations

EndpointMethod (com.google.api.server.spi.EndpointMethod)1 ApiMethodConfig (com.google.api.server.spi.config.model.ApiMethodConfig)1 ArrayEndpoint (com.google.api.server.spi.testing.ArrayEndpoint)1 Test (org.junit.Test)1