Search in sources :

Example 1 with ModelStub

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"));
}
Also used : ServerCache(com.yahoo.vespa.config.server.ServerCache) Version(com.yahoo.config.provision.Version) ApplicationId(com.yahoo.config.provision.ApplicationId) ModelStub(com.yahoo.vespa.config.server.ModelStub) Test(org.junit.Test)

Aggregations

ApplicationId (com.yahoo.config.provision.ApplicationId)1 Version (com.yahoo.config.provision.Version)1 ModelStub (com.yahoo.vespa.config.server.ModelStub)1 ServerCache (com.yahoo.vespa.config.server.ServerCache)1 Test (org.junit.Test)1