use of com.alipay.sofa.rpc.config.ProviderConfig in project sofa-rpc by sofastack.
the class DubboProviderBootstrapTest method setUp.
@Before
public void setUp() throws Exception {
ApplicationConfig serverApplacation = new ApplicationConfig();
serverApplacation.setAppName("server");
ProviderConfig providerConfig = new ProviderConfig<DemoService>().setInterfaceId(DemoService.class.getName()).setRef(new DemoServiceImpl()).setBootstrap("dubbo").setParameter("version", "1.0.1").setRegister(false).setApplication(serverApplacation);
dubboProviderBootstrap = new DubboProviderBootstrap(providerConfig);
}
use of com.alipay.sofa.rpc.config.ProviderConfig in project sofa-rpc by sofastack.
the class DefaultProviderBootstrapTest method PrefixIncludeListTest.
@Test
public void PrefixIncludeListTest() {
ProviderConfig providerConfig = new ProviderConfig();
DefaultProviderBootstrap defaultProviderBootstra = new DefaultProviderBootstrap(providerConfig);
boolean result = defaultProviderBootstra.inList("hello1", "hello1", "hello");
Assert.assertTrue(!result);
}
use of com.alipay.sofa.rpc.config.ProviderConfig in project sofa-rpc by sofastack.
the class DefaultProviderBootstrapTest method excludeListTest.
@Test
public void excludeListTest() {
ProviderConfig providerConfig = new ProviderConfig();
DefaultProviderBootstrap defaultProviderBootstra = new DefaultProviderBootstrap(providerConfig);
boolean result = defaultProviderBootstra.inList("hello1", "hello2", "hello2");
Assert.assertTrue(!result);
}
use of com.alipay.sofa.rpc.config.ProviderConfig in project sofa-rpc by sofastack.
the class DefaultProviderBootstrapTest method notInListTest.
@Test
public void notInListTest() {
ProviderConfig providerConfig = new ProviderConfig();
DefaultProviderBootstrap defaultProviderBootstra = new DefaultProviderBootstrap(providerConfig);
boolean result = defaultProviderBootstra.inList("hello1", "hello2", "hello3");
Assert.assertTrue(!result);
}
use of com.alipay.sofa.rpc.config.ProviderConfig in project sofa-rpc by sofastack.
the class DefaultProviderBootstrapTest method includeMultiListTest.
@Test
public void includeMultiListTest() {
ProviderConfig providerConfig = new ProviderConfig();
DefaultProviderBootstrap defaultProviderBootstra = new DefaultProviderBootstrap(providerConfig);
boolean result = defaultProviderBootstra.inList("hello1,hello3", "hello1,hello2,hello4", "hello1");
Assert.assertTrue(!result);
}
Aggregations