use of limelight.ui.model.TestablePanelBase in project limelight by slagyr.
the class PanelEventHandlerTest method setUp.
@Before
public void setUp() throws Exception {
action = new MockEventAction();
parent = new TestableParentPanel();
panel = new TestablePanelBase();
parent.add(panel);
}
use of limelight.ui.model.TestablePanelBase in project limelight by slagyr.
the class PanelEventTest method theRecipientIsSetOnlyDuringDispatchAndThenRestored.
@Test
public void theRecipientIsSetOnlyDuringDispatchAndThenRestored() throws Exception {
TestablePanelBase recipient = new TestablePanelBase();
recipient.getEventHandler().add(TestableEvent.class, new EventAction() {
public void invoke(Event event) {
dispatchedRecipient = ((PanelEvent) event).getRecipient();
}
});
event.dispatch(recipient);
assertEquals(recipient, dispatchedRecipient);
assertEquals(source, event.getRecipient());
}
Aggregations