use of com.yahoo.container.di.config.JerseyBundlesConfig in project vespa by vespa-engine.
the class RestApiTest method packages_to_scan_are_included_in_config.
@Test
public void packages_to_scan_are_included_in_config() throws Exception {
setup();
JerseyBundlesConfig config = root.getConfig(JerseyBundlesConfig.class, context.getConfigId());
assertThat(config.bundles(0).packages(), contains("com.yahoo.foo"));
}
use of com.yahoo.container.di.config.JerseyBundlesConfig in project vespa by vespa-engine.
the class RestApiTest method resource_bundles_are_included_in_config.
@Test
public void resource_bundles_are_included_in_config() throws Exception {
setup();
JerseyBundlesConfig config = root.getConfig(JerseyBundlesConfig.class, context.getConfigId());
assertThat(config.bundles().size(), is(1));
assertThat(config.bundles(0).spec(), is("my-jersey-bundle:1.0"));
}
use of com.yahoo.container.di.config.JerseyBundlesConfig in project vespa by vespa-engine.
the class MultipleRestApisTest method each_rest_api_has_correct_bundle.
@Test
public void each_rest_api_has_correct_bundle() {
RestApiContext restApiContext1 = restApis.get(ComponentId.fromString(PATH_1)).getContext();
RestApiContext restApiContext2 = restApis.get(ComponentId.fromString(PATH_2)).getContext();
JerseyBundlesConfig bundlesConfig1 = root.getConfig(JerseyBundlesConfig.class, restApiContext1.getConfigId());
assertThat(bundlesConfig1.toString(), containsString("bundle1"));
assertThat(bundlesConfig1.toString(), not(containsString("bundle2")));
JerseyBundlesConfig bundlesConfig2 = root.getConfig(JerseyBundlesConfig.class, restApiContext2.getConfigId());
assertThat(bundlesConfig2.toString(), containsString("bundle2"));
assertThat(bundlesConfig2.toString(), not(containsString("bundle1")));
}
Aggregations