Package limelight.ui.model

Examples of limelight.ui.model.MockStage


  @Test
  public void openSceneLoadsStylesExtendingProductionStyles() throws Exception
  {
    production.loadProduction();
    production.getTheater().add(new MockStage("mock"));
    production.getStyles().put("newStyle", new RichStyle());
    Scene scene = new FakeScene();
    production.stubbedScene = scene;

    production.openScene("scenePath", "mock", Util.toMap());
View Full Code Here


  @Test
  public void openDefaultScenes() throws Exception
  {
    production.getEventHandler().add(ProductionOpenedEvent.class, action);
    MockStage stage = new MockStage();
    production.getTheater().add(stage);
    stage.setDefaultSceneName("defaultScene");
    Scene scene = new FakeScene();
    production.stubbedScene = scene;

    production.open(new Opts());

    assertEquals(true, action.invoked);
    assertEquals(true, stage.isOpen());
    assertEquals(scene, stage.getScene());
  }
View Full Code Here

  }

  @Test
  public void defaultScenesCanBeDisabled() throws Exception
  {
    MockStage stage = new MockStage();
    production.getTheater().add(stage);
    stage.setDefaultSceneName("defaultScene");
    production.stubbedScene = new FakeScene();

    production.open(Util.toMap("open-default-scenes", false));

    assertEquals(false, stage.isOpen());
    assertEquals(null, stage.getScene());
  }
View Full Code Here

  @Before
  public void setUp() throws Exception
  {
    production = new FakeProduction();
    theater = new Theater(production);
    defaultStage = new MockStage("default");
  }
View Full Code Here

  }

  @Test
  public void activeStage() throws Exception
  {
    MockStage stage2 = new MockStage("two");
    theater.add(defaultStage);
    theater.add(stage2);

    assertEquals(null, theater.getActiveStage());
View Full Code Here

  }

  @Test
  public void getStageByName() throws Exception
  {
    MockStage stage2 = new MockStage("two");
    MockStage stage3 = new MockStage("three");
    theater.add(defaultStage);
    theater.add(stage2);
    theater.add(stage3);

    assertEquals(defaultStage, theater.get("default"));
View Full Code Here

  }

  @Test
  public void doesNotAllowDuplicateNames() throws Exception
  {
    MockStage stage2 = new MockStage("default");
    theater.add(defaultStage);

    try
    {
      theater.add(stage2);
View Full Code Here

  }

  @Test
  public void doesntTryToCloseTheProductionWhenEmptiedButHasVitalStages() throws Exception
  {
    MockStage stage2 = new MockStage("two");
    theater.add(defaultStage);
    theater.add(stage2);
    stage2.setVital(true);

    new StageClosedEvent().dispatch(defaultStage);

    assertEquals(false, production.closeAttempted);
  }
View Full Code Here

  }

  @Test
  public void canClose() throws Exception
  {
    MockStage stage2 = new MockStage("two");
    MockStage stage3 = new MockStage("three");
    theater.add(defaultStage);
    theater.add(stage2);
    theater.add(stage3);

    theater.close();
View Full Code Here

  }

  @Test
  public void knowsWhenStagesAreDeactivated() throws Exception
  {
    MockStage stage2 = new MockStage("two");
    theater.add(defaultStage);
    theater.add(stage2);

    new StageActivatedEvent().dispatch(defaultStage);
    new StageDeactivatedEvent().dispatch(defaultStage);
View Full Code Here

TOP

Related Classes of limelight.ui.model.MockStage

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.