use of com.google.api.server.spi.config.PeerAuthenticator in project endpoints-java by cloudendpoints.
the class ApiMethodAnnotationConfigTest method setUp.
@Before
public void setUp() throws Exception {
serializationConfig = new ApiSerializationConfig();
Mockito.when(apiClassConfig.getApiConfig()).thenReturn(apiConfig);
Mockito.when(apiClassConfig.getAuthLevel()).thenReturn(AuthLevel.NONE);
Mockito.when(apiClassConfig.getScopeExpression()).thenReturn(defaultScopeExpression);
Mockito.when(apiClassConfig.getAudiences()).thenReturn(defaultAudiences);
Mockito.when(apiClassConfig.getClientIds()).thenReturn(defaultClientIds);
Mockito.<List<Class<? extends Authenticator>>>when(apiClassConfig.getAuthenticators()).thenReturn(defaultAuthenticators);
Mockito.<List<Class<? extends PeerAuthenticator>>>when(apiClassConfig.getPeerAuthenticators()).thenReturn(defaultPeerAuthenticators);
Mockito.when(apiClassConfig.getApiClassJavaSimpleName()).thenReturn(TestEndpoint.class.getSimpleName());
Mockito.when(apiConfig.getSerializationConfig()).thenReturn(serializationConfig);
EndpointMethod method = EndpointMethod.create(TestEndpoint.class, TestEndpoint.class.getMethod("overrideMethod1"));
config = new ApiMethodConfig(method, new TypeLoader(), apiClassConfig);
annotationConfig = new ApiMethodAnnotationConfig(config);
}
Aggregations