Search in sources :

Example 6 with BundleInstantiationSpecification

use of com.yahoo.container.bundle.BundleInstantiationSpecification in project vespa by vespa-engine.

the class DomSearcherBuilderTest method ensureCorrectModel.

@Test
public void ensureCorrectModel() {
    ChainedComponent<ChainedComponentModel> searcher = new DomSearcherBuilder().doBuild(root, parse("<searcher id='theId' class='theclassid' bundle='thebundle' provides='p1'>", "    <provides>p2</provides>", "</searcher>"));
    ChainedComponentModel model = searcher.model;
    assertEquals(2, model.dependencies.provides().size());
    BundleInstantiationSpecification instantiationSpecification = model.bundleInstantiationSpec;
    assertEquals("theId", instantiationSpecification.id.stringValue());
    assertEquals("theclassid", instantiationSpecification.classId.stringValue());
    assertEquals("thebundle", instantiationSpecification.bundle.stringValue());
}
Also used : ChainedComponentModel(com.yahoo.component.chain.model.ChainedComponentModel) BundleInstantiationSpecification(com.yahoo.container.bundle.BundleInstantiationSpecification) Test(org.junit.Test) DomBuilderTest(com.yahoo.config.model.builder.xml.test.DomBuilderTest)

Aggregations

BundleInstantiationSpecification (com.yahoo.container.bundle.BundleInstantiationSpecification)6 ComponentSpecification (com.yahoo.component.ComponentSpecification)2 DomBuilderTest (com.yahoo.config.model.builder.xml.test.DomBuilderTest)2 Test (org.junit.Test)2 ComponentId (com.yahoo.component.ComponentId)1 ChainedComponentModel (com.yahoo.component.chain.model.ChainedComponentModel)1 FileReference (com.yahoo.config.FileReference)1 CloudSubscriberFactory (com.yahoo.container.di.CloudSubscriberFactory)1 Container (com.yahoo.container.di.Container)1 ContainerTest (com.yahoo.container.di.ContainerTest)1 Osgi (com.yahoo.container.di.Osgi)1 MbusServerProvider (com.yahoo.container.jdisc.messagebus.MbusServerProvider)1 ComponentModel (com.yahoo.osgi.provider.model.ComponentModel)1 Bundle (org.osgi.framework.Bundle)1