Search in sources :

Example 6 with EventAction

use of limelight.events.EventAction in project limelight by slagyr.

the class EventActionMulticasterTest method addingToNullEvent.

@Test
public void addingToNullEvent() throws Exception {
    EventAction action = EventActionMulticaster.add(action1, null);
    assertSame(action1, action);
}
Also used : EventAction(limelight.events.EventAction) Test(org.junit.Test)

Example 7 with EventAction

use of limelight.events.EventAction in project limelight by slagyr.

the class EventActionMulticasterTest method removingSecondOfTwo.

@Test
public void removingSecondOfTwo() throws Exception {
    EventAction action = EventActionMulticaster.add(action1, action2);
    EventAction result = EventActionMulticaster.remove(action, action2);
    assertSame(result, action1);
}
Also used : EventAction(limelight.events.EventAction) Test(org.junit.Test)

Example 8 with EventAction

use of limelight.events.EventAction in project limelight by slagyr.

the class EventActionMulticasterTest method addingTwoActions.

@Test
public void addingTwoActions() throws Exception {
    EventAction action = EventActionMulticaster.add(action1, action2);
    assertEquals(EventActionMulticaster.class, action.getClass());
    EventActionMulticaster multicaster = (EventActionMulticaster) action;
    assertEquals(action1, multicaster.getFirst());
    assertEquals(action2, multicaster.getSecond());
}
Also used : EventAction(limelight.events.EventAction) Test(org.junit.Test)

Example 9 with EventAction

use of limelight.events.EventAction in project limelight by slagyr.

the class EventActionMulticasterTest method removingNull.

@Test
public void removingNull() throws Exception {
    EventAction action = EventActionMulticaster.remove(action1, null);
    assertSame(action1, action);
}
Also used : EventAction(limelight.events.EventAction) Test(org.junit.Test)

Example 10 with EventAction

use of limelight.events.EventAction in project limelight by slagyr.

the class EventActionMulticasterTest method actionsAreInvokedInOrder.

@Test
public void actionsAreInvokedInOrder() throws Exception {
    EventAction action = EventActionMulticaster.add(action1, action2);
    action.invoke(null);
    assertSame(action1, invokations.get(0));
    assertSame(action2, invokations.get(1));
}
Also used : EventAction(limelight.events.EventAction) Test(org.junit.Test)

Aggregations

EventAction (limelight.events.EventAction)22 Test (org.junit.Test)18 Event (limelight.events.Event)4 SimplePropProxy (limelight.ui.SimplePropProxy)3 MouseClickedEvent (limelight.ui.events.panel.MouseClickedEvent)3 MouseEnteredEvent (limelight.ui.events.panel.MouseEnteredEvent)3 PanelEvent (limelight.ui.events.panel.PanelEvent)3 PropPanel (limelight.ui.model.PropPanel)3 ProductionCreatedEvent (limelight.model.events.ProductionCreatedEvent)1 TestablePanelBase (limelight.ui.model.TestablePanelBase)1 MockEventAction (limelight.ui.model.inputs.MockEventAction)1