// check that event was received and that subject was injected...
// since bridge is notified asynchronously by default,
// we must wait till notification is received
ParallelTestContainer helper = new ParallelTestContainer() {
@Override
protected void assertResult() throws Exception {
assertTrue(bridge.lastLocalEvent instanceof SnapshotEvent);
assertEquals(local, bridge.lastLocalEvent.getSubject());
}
};
helper.runTest(5000);
final SnapshotEvent eventWithSubject = new SnapshotEvent(
this,
this,
null,
null,
null,
null);
eventWithSubject.setSubject(local);
manager.postEvent(eventWithNoSubject, local);
// check that event was received and that subject was injected...
// since bridge is notified asynchronously by default,
// we must wait till notification is received
ParallelTestContainer helper1 = new ParallelTestContainer() {
@Override
protected void assertResult() throws Exception {
assertTrue(bridge.lastLocalEvent instanceof SnapshotEvent);
assertEquals(local, bridge.lastLocalEvent.getSubject());
}
};
helper1.runTest(5000);
}