Package limelight.events

Examples of limelight.events.EventAction


  }

  @Test
  public void removingNull() throws Exception
  {
    EventAction action = EventActionMulticaster.remove(action1, null);

    assertSame(action1, action);
  }
View Full Code Here


  }

  @Test
  public void removingFromNull() throws Exception
  {
    EventAction action = EventActionMulticaster.remove(null, action1);

    assertEquals(null, action);
  }
View Full Code Here

  }

  @Test
  public void removingFirstOfTwo() throws Exception
  {
    EventAction action = EventActionMulticaster.add(action1, action2);
    EventAction result = EventActionMulticaster.remove(action, action1);

    assertSame(result, action2);
  }
View Full Code Here

  }

  @Test
  public void removingSecondOfTwo() throws Exception
  {
    EventAction action = EventActionMulticaster.add(action1, action2);
    EventAction result = EventActionMulticaster.remove(action, action2);

    assertSame(result, action1);
  }
View Full Code Here

  }

  @Test
  public void removingNeitherOfTwo() throws Exception
  {
    EventAction action = EventActionMulticaster.add(action1, action2);
    EventAction result = EventActionMulticaster.remove(action, action3);

    assertSame(action, result);
  }
View Full Code Here

  }

  @Test
  public void removingFirstOfThree() throws Exception
  {
    EventAction action = EventActionMulticaster.add(action1, action2);
    action = EventActionMulticaster.add(action, action3);

    EventAction result = EventActionMulticaster.remove(action, action1);

    assertEquals(EventActionMulticaster.class, result.getClass());
    EventActionMulticaster multicaster = (EventActionMulticaster) result;
    assertSame(action2, multicaster.getFirst());
    assertSame(action3, multicaster.getSecond());
  }
View Full Code Here

  }

  @Test
  public void removingMiddleOfThree() throws Exception
  {
    EventAction action = EventActionMulticaster.add(action1, action2);
    action = EventActionMulticaster.add(action, action3);

    EventAction result = EventActionMulticaster.remove(action, action2);

    assertEquals(EventActionMulticaster.class, result.getClass());
    EventActionMulticaster multicaster = (EventActionMulticaster) result;
    assertSame(action1, multicaster.getFirst());
    assertSame(action3, multicaster.getSecond());
  }
View Full Code Here

  }

  @Test
  public void removingLastOfThree() throws Exception
  {
    EventAction action = EventActionMulticaster.add(action1, action2);
    action = EventActionMulticaster.add(action, action3);

    EventAction result = EventActionMulticaster.remove(action, action3);

    assertEquals(EventActionMulticaster.class, result.getClass());
    EventActionMulticaster multicaster = (EventActionMulticaster) result;
    assertSame(action1, multicaster.getFirst());
    assertSame(action2, multicaster.getSecond());
  }
View Full Code Here

  }

  @Test
  public void collectingTwoActions() throws Exception
  {
    EventAction action = EventActionMulticaster.add(action1, action2);
    List<EventAction> actions = EventActionMulticaster.collect(action);

    assertEquals(2, actions.size());
    assertSame(action1, actions.get(0));
    assertSame(action2, actions.get(1));
View Full Code Here

  }

  @Test
  public void collectingLotsOfActions() throws Exception
  {
    EventAction action = EventActionMulticaster.add(action1, action2);
    action = EventActionMulticaster.add(action, action3);
    action = EventActionMulticaster.add(action, action4);
    action = EventActionMulticaster.add(action, action5);

    List<EventAction> actions = EventActionMulticaster.collect(action);
View Full Code Here

TOP

Related Classes of limelight.events.EventAction

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.