use of com.yahoo.vespa.config.server.ModelStub in project vespa by vespa-engine.
the class ApplicationTest method testThatApplicationIsInitialized.
@Test
public void testThatApplicationIsInitialized() throws IOException, SAXException {
ApplicationId appId = ApplicationId.from(TenantName.defaultName(), ApplicationName.from("foobar"), InstanceName.defaultName());
ServerCache cache = new ServerCache();
Version vespaVersion = Version.fromIntValues(1, 2, 3);
Application app = new Application(new ModelStub(), cache, 1337, vespaVersion, MetricUpdater.createTestUpdater(), appId);
assertThat(app.getApplicationGeneration(), is(1337l));
assertNotNull(app.getModel());
assertThat(app.getCache(), is(cache));
assertThat(app.getId().application().value(), is("foobar"));
assertThat(app.getVespaVersion(), is(vespaVersion));
assertThat(app.toString(), is("application 'foobar', generation 1337, vespa version 1.2.3"));
}
Aggregations