use of io.servicecomb.core.provider.consumer.ConsumerProviderManager in project java-chassis by ServiceComb.
the class TestConsumer method testConsumerProviderManager.
@SuppressWarnings({ "rawtypes", "unchecked" })
@Test
public void testConsumerProviderManager() {
ConsumerProviderManager oConsumerProviderManager = new ConsumerProviderManager();
RegisterManager oRegisterManager = new RegisterManager("cse consumer provider manager");
oRegisterManager.register("cse.references.cse consumer provider manager", "cse consumer provider manager");
boolean validAssert = true;
try {
oConsumerProviderManager.getReferenceConfig("consumer provider manager");
} catch (Exception e) {
Assert.assertNotEquals(null, e);
validAssert = false;
} catch (Throwable ee) {
Assert.assertNotEquals(null, ee);
validAssert = false;
}
Assert.assertFalse(validAssert);
}
use of io.servicecomb.core.provider.consumer.ConsumerProviderManager in project java-chassis by ServiceComb.
the class MockUtil method mockConsumerProviderManager.
public void mockConsumerProviderManager() {
ConsumerProviderManager consumerProviderManager = new MockUp<ConsumerProviderManager>() {
@Mock
public ReferenceConfig getReferenceConfig(String microserviceName) {
return new ReferenceConfig("test", "test", "test");
}
}.getMockInstance();
CseContext.getInstance().setConsumerProviderManager(consumerProviderManager);
}
Aggregations