Search in sources :

Example 1 with CloseSessionRequest

use of org.roof.im.request.CloseSessionRequest in project roof-im by madfroglx.

the class CloseSessionTest method testSessionNotExists.

@Test
public void testSessionNotExists() throws Exception {
    CloseSessionRequest request = new CloseSessionRequest();
    request.setSessionId(123);
    request.setRequestType(RequestType.closeSession.name());
    request.setToken("abc");
    ValueStack valueStack = getValueStack(request);
    enterChain.doChain(valueStack);
}
Also used : ValueStack(com.roof.chain.api.ValueStack) GenericValueStack(com.roof.chain.support.GenericValueStack) CloseSessionRequest(org.roof.im.request.CloseSessionRequest) Test(org.junit.Test)

Example 2 with CloseSessionRequest

use of org.roof.im.request.CloseSessionRequest in project roof-im by madfroglx.

the class CloseSessionTest method testSuccess.

@Test
public void testSuccess() throws Exception {
    Session session = sessionManager.open("abc", "efg", 0, 99);
    CloseSessionRequest request = new CloseSessionRequest();
    request.setSessionId(session.getId());
    request.setRequestType(RequestType.closeSession.name());
    request.setToken("abc");
    ValueStack valueStack = getValueStack(request);
    enterChain.doChain(valueStack);
}
Also used : ValueStack(com.roof.chain.api.ValueStack) GenericValueStack(com.roof.chain.support.GenericValueStack) CloseSessionRequest(org.roof.im.request.CloseSessionRequest) Session(org.roof.im.session.Session) Test(org.junit.Test)

Aggregations

ValueStack (com.roof.chain.api.ValueStack)2 GenericValueStack (com.roof.chain.support.GenericValueStack)2 Test (org.junit.Test)2 CloseSessionRequest (org.roof.im.request.CloseSessionRequest)2 Session (org.roof.im.session.Session)1