use of com.google.api.server.spi.EndpointMethod in project endpoints-java by cloudendpoints.
the class ApiAnnotationConfigTest method testSetAudiencesIfSpecified_empty.
@Test
public void testSetAudiencesIfSpecified_empty() throws Exception {
String[] empty = {};
annotationConfig.setAudiencesIfSpecified(empty);
EndpointMethod method = getResultNoParamsMethod();
ApiMethodConfig methodConfig = config.getApiClassConfig().getMethods().getOrCreate(method);
assertEquals(Collections.emptyList(), methodConfig.getAudiences());
String[] audiences = { "bleh", "more bleh" };
annotationConfig.setAudiencesIfSpecified(audiences);
annotationConfig.setAudiencesIfSpecified(empty);
assertEquals(Collections.emptyList(), config.getAudiences());
}
Aggregations