use of com.hotels.styx.api.extension.service.spi.StyxService in project styx by ExpediaGroup.
the class ServiceProvisionTest method ignoresDisabledServices.
@Test
public void ignoresDisabledServices() {
Environment env = environmentWithConfig(mixedDisabledServices);
Map<String, StyxService> services = loadServices(env.configuration(), env, "multi", StyxService.class);
assertThat(services.isEmpty(), is(true));
}
use of com.hotels.styx.api.extension.service.spi.StyxService in project styx by ExpediaGroup.
the class ServiceProvisionTest method loadsFromMixedConfigFormat.
@Test
public void loadsFromMixedConfigFormat() {
Environment env = environmentWithConfig(yamlForMixedServiceFactories);
Map<String, StyxService> services = loadServices(env.configuration(), env, "multi", StyxService.class);
assertThat(services.get("backendProvider"), instanceOf(BackendServiceProvider.class));
assertThat(services.get("routingProvider"), instanceOf(RoutingObjectProvider.class));
}
use of com.hotels.styx.api.extension.service.spi.StyxService in project styx by ExpediaGroup.
the class StyxServerComponentsTest method exposesAdditionalServices.
@Test
public void exposesAdditionalServices() {
StyxServerComponents components = new StyxServerComponents.Builder().registry(new MicrometerRegistry((new CompositeMeterRegistry()))).styxConfig(new StyxConfig()).additionalServices(Map.of("service1", mock(StyxService.class), "service2", mock(StyxService.class))).build();
Map<String, StyxService> services = components.services();
assertThat(services.keySet(), containsInAnyOrder("service1", "service2"));
}
Aggregations