Search in sources :

Example 1 with PojoProducerMeta

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());
    }
}
Also used : PojoProducerMeta(io.servicecomb.provider.pojo.schema.PojoProducerMeta)

Example 2 with PojoProducerMeta

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;
        }
    };
}
Also used : PojoProducerMeta(io.servicecomb.provider.pojo.schema.PojoProducerMeta) MockUp(mockit.MockUp) OperationMeta(io.servicecomb.core.definition.OperationMeta)

Aggregations

PojoProducerMeta (io.servicecomb.provider.pojo.schema.PojoProducerMeta)2 OperationMeta (io.servicecomb.core.definition.OperationMeta)1 MockUp (mockit.MockUp)1