Search in sources :

Example 6 with TestObjectB

use of com.alipay.sofa.ark.container.testdata.impl.TestObjectB in project sofa-ark by alipay.

the class ServiceRegistrationTest method testContainerService.

@Test
public void testContainerService() {
    registryService.publishService(ITest.class, new TestObjectA(), new ContainerServiceProvider(20000));
    registryService.publishService(ITest.class, new TestObjectB(), new ContainerServiceProvider(100));
    registryService.publishService(ITest.class, new TestObjectC(), new ContainerServiceProvider(200));
    Assert.assertEquals(TestObjectB.OUTPUT, registryService.referenceService(ITest.class).getService().test());
    Assert.assertEquals(3, registryService.referenceServices(ITest.class).size());
}
Also used : TestObjectC(com.alipay.sofa.ark.container.testdata.impl.TestObjectC) TestObjectA(com.alipay.sofa.ark.container.testdata.impl.TestObjectA) TestObjectB(com.alipay.sofa.ark.container.testdata.impl.TestObjectB) ITest(com.alipay.sofa.ark.container.testdata.ITest) ContainerServiceProvider(com.alipay.sofa.ark.container.registry.ContainerServiceProvider) BaseTest(com.alipay.sofa.ark.container.BaseTest) ITest(com.alipay.sofa.ark.container.testdata.ITest) Test(org.junit.Test)

Aggregations

BaseTest (com.alipay.sofa.ark.container.BaseTest)6 ITest (com.alipay.sofa.ark.container.testdata.ITest)6 TestObjectA (com.alipay.sofa.ark.container.testdata.impl.TestObjectA)6 TestObjectB (com.alipay.sofa.ark.container.testdata.impl.TestObjectB)6 Test (org.junit.Test)6 TestObjectC (com.alipay.sofa.ark.container.testdata.impl.TestObjectC)4 ContainerServiceProvider (com.alipay.sofa.ark.container.registry.ContainerServiceProvider)3 PluginModel (com.alipay.sofa.ark.container.model.PluginModel)2 ArkContainerServiceProvider (com.alipay.sofa.ark.container.registry.ArkContainerServiceProvider)2 DefaultServiceFilter (com.alipay.sofa.ark.container.registry.DefaultServiceFilter)2 PluginServiceProvider (com.alipay.sofa.ark.container.registry.PluginServiceProvider)2 ServiceFilter (com.alipay.sofa.ark.spi.registry.ServiceFilter)2 ServiceProvider (com.alipay.sofa.ark.spi.registry.ServiceProvider)2 PluginNameServiceFilter (com.alipay.sofa.ark.container.registry.PluginNameServiceFilter)1 ServiceReference (com.alipay.sofa.ark.spi.registry.ServiceReference)1