Search in sources :

Example 1 with Model

use of com.weibo.api.motan.protocol.example.Model in project motan by weibocom.

the class DefaultRpcCodecTest method testObjectTypeRequest.

@Test
public void testObjectTypeRequest() throws Exception {
    DefaultRequest request = getRequest("com.weibo.api.motan.protocol.example.Model", new Object[] { new Model("world", 12, Model.class) });
    testCodecRequest(request);
}
Also used : DefaultRequest(com.weibo.api.motan.rpc.DefaultRequest) Model(com.weibo.api.motan.protocol.example.Model) Test(org.junit.Test)

Example 2 with Model

use of com.weibo.api.motan.protocol.example.Model in project motan by weibocom.

the class DefaultRpcCodecTest method testHalfNullRequest.

@Test
public void testHalfNullRequest() throws Exception {
    DefaultRequest request = getRequest("com.weibo.api.motan.protocol.example.Model,com.weibo.api.motan.protocol.example.Model", new Object[] { null, new Model("world", 12, Model.class) });
    testCodecRequest(request);
}
Also used : DefaultRequest(com.weibo.api.motan.rpc.DefaultRequest) Model(com.weibo.api.motan.protocol.example.Model) Test(org.junit.Test)

Example 3 with Model

use of com.weibo.api.motan.protocol.example.Model in project motan by weibocom.

the class DefaultRpcCodecTest method testHalfNullRequest1.

@Test
public void testHalfNullRequest1() throws Exception {
    DefaultRequest request = getRequest("com.weibo.api.motan.protocol.example.Model[]", new Object[] { new Model[] { null, new Model("world", 12, Model.class) } });
    testCodecRequest(request);
}
Also used : DefaultRequest(com.weibo.api.motan.rpc.DefaultRequest) Model(com.weibo.api.motan.protocol.example.Model) Test(org.junit.Test)

Example 4 with Model

use of com.weibo.api.motan.protocol.example.Model in project motan by weibocom.

the class DefaultRpcCodecTest method testObjectResponse.

@Test
public void testObjectResponse() throws Exception {
    DefaultResponse response = new DefaultResponse();
    response.setValue(new Model("world", 12, Model.class));
    testCodecResponse(response);
}
Also used : DefaultResponse(com.weibo.api.motan.rpc.DefaultResponse) Model(com.weibo.api.motan.protocol.example.Model) Test(org.junit.Test)

Example 5 with Model

use of com.weibo.api.motan.protocol.example.Model in project motan by weibocom.

the class DefaultRpcCodecTest method testMultiTypeRequest.

@Test
public void testMultiTypeRequest() throws Exception {
    DefaultRequest request = getRequest("com.weibo.api.motan.protocol.example.Model,java.lang.Integer,java.lang.String", new Object[] { new Model("world", 12, Model.class), 1, "hello" });
    testCodecRequest(request);
}
Also used : DefaultRequest(com.weibo.api.motan.rpc.DefaultRequest) Model(com.weibo.api.motan.protocol.example.Model) Test(org.junit.Test)

Aggregations

Model (com.weibo.api.motan.protocol.example.Model)6 Test (org.junit.Test)6 DefaultRequest (com.weibo.api.motan.rpc.DefaultRequest)5 DefaultResponse (com.weibo.api.motan.rpc.DefaultResponse)1