Package limelight.styles.values

Source Code of limelight.styles.values.StaticXCoordinateValueTest

//- Copyright © 2008-2011 8th Light, Inc. All Rights Reserved.
//- Limelight and all included source files are distributed under terms of the MIT License.

package limelight.styles.values;

import junit.framework.TestCase;
import limelight.util.Box;

public class StaticXCoordinateValueTest extends TestCase
{
  private StaticXCoordinateValue ten;
  private StaticXCoordinateValue fifty;

  public void setUp() throws Exception
  {
    ten = new StaticXCoordinateValue(10);
    fifty = new StaticXCoordinateValue(50);
  }

  public void testGetX() throws Exception
  {
    assertEquals(10, ten.getX(0, new Box(0, 0, 100, 100)));
    assertEquals(15, ten.getX(0, new Box(5, 0, 100, 100)));
    assertEquals(10, ten.getX(-1, new Box(0, 0, 100, 100)));

    assertEquals(50, fifty.getX(0, new Box(0, 0, 100, 100)));
  }
}
TOP

Related Classes of limelight.styles.values.StaticXCoordinateValueTest

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.