use of io.servicecomb.provider.pojo.schema.PojoProducerMeta in project java-chassis by ServiceComb.
the class PojoProducerProvider method init.
@Override
public void init() throws Exception {
for (PojoProducerMeta pojoProducerMeta : pojoProducers.getProcucers()) {
initPojoProducerMeta(pojoProducerMeta);
producerSchemaFactory.getOrCreateProducerSchema(RegistryUtils.getMicroservice().getServiceName(), pojoProducerMeta.getSchemaId(), pojoProducerMeta.getInstanceClass(), pojoProducerMeta.getInstance());
}
}
use of io.servicecomb.provider.pojo.schema.PojoProducerMeta in project java-chassis by ServiceComb.
the class MockUtil method mockAbstractServiceProvider.
public void mockAbstractServiceProvider() {
new MockUp<AbstractProducerProvider>() {
@SuppressWarnings("unchecked")
@Mock
protected <T> T findProviderSchema(OperationMeta operationMeta) {
PojoProducerMeta lPojoSchemaMeta = Mockito.mock(PojoProducerMeta.class);
Mockito.when(lPojoSchemaMeta.getInstance()).thenReturn(lPojoSchemaMeta);
return (T) lPojoSchemaMeta;
}
};
}
Aggregations