Package limelight.builtin.players

Source Code of limelight.builtin.players.ButtonTest

package limelight.builtin.players;

import limelight.model.api.FakePropProxy;
import limelight.model.api.FakeSceneProxy;
import limelight.ui.events.panel.CastEvent;
import limelight.ui.model.FakeScene;
import limelight.ui.model.PropPanel;
import limelight.ui.model.ScenePanel;
import org.junit.Before;
import org.junit.Test;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;

public class ButtonTest
{
  public Button button;
  public PropPanel propPanel;

  @Before
  public void setUp() throws Exception
  {
    button = new Button();
    propPanel = new PropPanel(new FakePropProxy());
    new FakeScene().add(propPanel);
    button.install(new CastEvent(propPanel));
  }

  @Test
  public void installation() throws Exception
  {
    assertEquals(propPanel, button.getPropPanel());
    assertNotNull(button.getButtonPanel());
    assertEquals(button.getButtonPanel(), propPanel.getChildren().get(0));
    assertEquals(true, propPanel.isSterilized());
    assertNotNull(propPanel.getBackstage().get("button"));
    assertEquals(Button.class, propPanel.getBackstage().get("button").getClass());
  }
}
TOP

Related Classes of limelight.builtin.players.ButtonTest

TOP
Copyright © 2018 www.massapi.com. 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.