use of org.roof.im.request.OpenSessionRequest in project roof-im by madfroglx.
the class OpenSessionTest method testSuccess.
@Test
public void testSuccess() throws Exception {
OpenSessionRequest openSessionRequest = new OpenSessionRequest();
openSessionRequest.setSender("abc");
openSessionRequest.setReceiver("def");
openSessionRequest.setToken("ab");
openSessionRequest.setRequestType(RequestType.openSession.name());
ValueStack valueStack = new GenericValueStack();
valueStack.set(ImConstant.TEXT_MESSAGE, JSON.toJSONString(openSessionRequest));
JSONObject jsonObjectMessage = JSON.parseObject(JSON.toJSONString(openSessionRequest));
valueStack.set(ImConstant.JSON_OBJECT_MESSAGE, jsonObjectMessage);
enterChain.doChain(valueStack);
}
Aggregations