use of org.roof.im.request.OfflineRequest in project roof-im by madfroglx.
the class OfflineTest method testUserNotOnline.
@Test
public void testUserNotOnline() throws Exception {
OfflineRequest offlineRequest = createRequest();
ValueStack valueStack = createValueStack(offlineRequest);
enterChain.doChain(valueStack);
}
use of org.roof.im.request.OfflineRequest in project roof-im by madfroglx.
the class OfflineTest method createRequest.
private OfflineRequest createRequest() {
OfflineRequest offlineRequest = new OfflineRequest();
offlineRequest.setClientType(ClientType.h5.name());
offlineRequest.setRequestType("offline");
offlineRequest.setToken("abc");
offlineRequest.setCreateTime(System.currentTimeMillis());
System.out.println(JSON.toJSONString(offlineRequest));
return offlineRequest;
}
use of org.roof.im.request.OfflineRequest in project roof-im by madfroglx.
the class OfflineTest method testSuccess.
@Test
public void testSuccess() throws Exception {
List<UserState> states = new ArrayList<>();
UserState userState = new UserState();
userState.setConnectId("1");
userState.setClientType(ClientType.h5.name());
userState.setUsername("abc");
userState.setServerName(serverNameBuilder.getName());
states.add(userState);
UserState userState2 = new UserState();
userState2.setConnectId("1");
userState2.setClientType("applet");
userState2.setUsername("abc");
userState2.setServerName(serverNameBuilder.getName());
states.add(userState2);
userStateService.online("abc", states);
OfflineRequest offlineRequest = createRequest();
ValueStack valueStack = createValueStack(offlineRequest);
enterChain.doChain(valueStack);
}
Aggregations