Package com.github.overengineer.scope.conversation.context

Examples of com.github.overengineer.scope.conversation.context.DefaultConversationContext


public class DefaultConversationContextTest extends SerializableObjectTest<DefaultConversationContext> {

    @Test
    public void testDefaultConversationContext() throws IOException, ClassNotFoundException {

        ConversationContext context = new DefaultConversationContext("testName", "testId", 5L);
        assertTrue(5L == context.getRemainingTime() || 4L == context.getRemainingTime());
        assertEquals("testName", context.getConversationName());
        assertEquals("testId", context.getId());
        context.put("bean", "beanValue");
        assertEquals("beanValue", context.get("bean"));
        context = SerializationTestingUtil.getSerializedCopy(context);
        assertEquals("testName", context.getConversationName());
        assertEquals("testId", context.getId());
        assertEquals("beanValue", context.get("bean"));
        assertEquals(5L, context.getRemainingTime());

        context.put("bean", null);
        assertNull(context.get("bean"));
    }
View Full Code Here

TOP

Related Classes of com.github.overengineer.scope.conversation.context.DefaultConversationContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.