Search in sources :

Example 1 with CseContext

use of io.servicecomb.core.CseContext in project java-chassis by ServiceComb.

the class TestDynamicSchemaLoader method init.

@BeforeClass
public static void init() {
    UnitTestMeta.init();
    SchemaLoader loader = new SchemaLoader();
    loader.setMicroserviceMetaManager(microserviceMetaManager);
    SchemaListenerManager schemaListenerManager = new SchemaListenerManager();
    schemaListenerManager.setSchemaListenerList(Collections.emptyList());
    CseContext context = CseContext.getInstance();
    context.setSchemaLoader(loader);
    context.setSchemaListenerManager(schemaListenerManager);
    Microservice microservice = new Microservice();
    microservice.setAppId("app");
    microservice.setServiceName("ms");
    ReflectUtils.setField(RegistryUtils.class, null, "microservice", microservice);
}
Also used : Microservice(io.servicecomb.serviceregistry.api.registry.Microservice) CseContext(io.servicecomb.core.CseContext) BeforeClass(org.junit.BeforeClass)

Aggregations

CseContext (io.servicecomb.core.CseContext)1 Microservice (io.servicecomb.serviceregistry.api.registry.Microservice)1 BeforeClass (org.junit.BeforeClass)1