Search in sources :

Example 1 with IPerson

use of org.apache.servicecomb.provider.pojo.IPerson in project incubator-servicecomb-java-chassis by apache.

the class TestPojoProducers method testPojoProducersSchemaIdNull.

@Test
public void testPojoProducersSchemaIdNull(@Injectable RpcSchema schema) {
    IPerson bean = new PersonEmptySchema();
    new Expectations() {

        {
        }
    };
    Assert.assertSame(bean, producer.postProcessAfterInitialization(bean, "test"));
    Assert.assertEquals(producer.getProducers().size(), 1);
}
Also used : Expectations(mockit.Expectations) IPerson(org.apache.servicecomb.provider.pojo.IPerson) Test(org.junit.Test)

Example 2 with IPerson

use of org.apache.servicecomb.provider.pojo.IPerson in project java-chassis by ServiceComb.

the class TestPojoProducers method testPojoProducersSchemaNull.

@Test
public void testPojoProducersSchemaNull(@Injectable RpcSchema schema) {
    IPerson bean = new IPerson() {
    };
    Assert.assertSame(bean, producer.postProcessAfterInitialization(bean, "test"));
    Assert.assertEquals(producer.getProducerMetas().size(), 0);
}
Also used : IPerson(org.apache.servicecomb.provider.pojo.IPerson) Test(org.junit.Test)

Example 3 with IPerson

use of org.apache.servicecomb.provider.pojo.IPerson in project incubator-servicecomb-java-chassis by apache.

the class TestPojoProducers method testPojoProducersSchemaNull.

@Test
public void testPojoProducersSchemaNull(@Injectable RpcSchema schema) {
    IPerson bean = new IPerson() {
    };
    Assert.assertSame(bean, producer.postProcessAfterInitialization(bean, "test"));
    Assert.assertEquals(producer.getProducers().size(), 0);
}
Also used : IPerson(org.apache.servicecomb.provider.pojo.IPerson) Test(org.junit.Test)

Example 4 with IPerson

use of org.apache.servicecomb.provider.pojo.IPerson in project java-chassis by ServiceComb.

the class TestPojoProducers method testPojoProducersSchemaIdNull.

@Test
public void testPojoProducersSchemaIdNull(@Injectable RpcSchema schema) {
    IPerson bean = new PersonEmptySchema();
    new Expectations() {

        {
        }
    };
    Assert.assertSame(bean, producer.postProcessAfterInitialization(bean, "test"));
    Assert.assertEquals(producer.getProducerMetas().size(), 1);
}
Also used : Expectations(mockit.Expectations) IPerson(org.apache.servicecomb.provider.pojo.IPerson) Test(org.junit.Test)

Aggregations

IPerson (org.apache.servicecomb.provider.pojo.IPerson)4 Test (org.junit.Test)4 Expectations (mockit.Expectations)2