Search in sources :

Example 1 with SessionEvent

use of io.atomix.primitive.session.SessionEvent in project atomix by atomix.

the class SessionEventTest method testRaftSessionEvent.

@Test
public void testRaftSessionEvent() throws Exception {
    Session session = mock(Session.class);
    long timestamp = System.currentTimeMillis();
    SessionEvent event = new SessionEvent(SessionEvent.Type.OPEN, session, timestamp);
    assertEquals(SessionEvent.Type.OPEN, event.type());
    assertEquals(session, event.subject());
    assertEquals(timestamp, event.time());
}
Also used : SessionEvent(io.atomix.primitive.session.SessionEvent) Session(io.atomix.primitive.session.Session) Test(org.junit.Test)

Aggregations

Session (io.atomix.primitive.session.Session)1 SessionEvent (io.atomix.primitive.session.SessionEvent)1 Test (org.junit.Test)1