Search in sources :

Example 16 with DiscoveryContext

use of com.google.api.server.spi.discovery.DiscoveryGenerator.DiscoveryContext in project endpoints-java by cloudendpoints.

the class DiscoveryGeneratorTest method testWriteDiscovery_directory.

@Test
public void testWriteDiscovery_directory() throws Exception {
    DiscoveryGenerator.Result result = generator.writeDiscovery(ImmutableList.of(configLoader.loadConfiguration(ServiceContext.create(), ArrayEndpoint.class), configLoader.loadConfiguration(ServiceContext.create(), EnumEndpoint.class)), new DiscoveryContext());
    assertThat(result.directory()).isEqualTo(readExpectedAsDirectory("directory.json"));
}
Also used : DiscoveryContext(com.google.api.server.spi.discovery.DiscoveryGenerator.DiscoveryContext) Test(org.junit.Test)

Aggregations

DiscoveryContext (com.google.api.server.spi.discovery.DiscoveryGenerator.DiscoveryContext)16 RestDescription (com.google.api.services.discovery.model.RestDescription)14 Test (org.junit.Test)14 ApiKey (com.google.api.server.spi.config.model.ApiKey)2 ImmutableMap (com.google.common.collect.ImmutableMap)2 Map (java.util.Map)2 ObjectWriter (com.fasterxml.jackson.databind.ObjectWriter)1 ServiceContext (com.google.api.server.spi.ServiceContext)1 TypeLoader (com.google.api.server.spi.TypeLoader)1 ApiConfigLoader (com.google.api.server.spi.config.ApiConfigLoader)1 ApiConfigAnnotationReader (com.google.api.server.spi.config.annotationreader.ApiConfigAnnotationReader)1 ApiConfig (com.google.api.server.spi.config.model.ApiConfig)1 SchemaRepository (com.google.api.server.spi.config.model.SchemaRepository)1 ApiConfigValidator (com.google.api.server.spi.config.validation.ApiConfigValidator)1 DiscoveryGenerator (com.google.api.server.spi.discovery.DiscoveryGenerator)1 EndpointsPrettyPrinter (com.google.api.server.spi.response.EndpointsPrettyPrinter)1 File (java.io.File)1 URLClassLoader (java.net.URLClassLoader)1