コード例 #1
0
  @Test
  public final void testShiftOnArrow() {

    vectorDefinition.shiftOnArrow(TestShiftValue);
    assertEquals(
        TestInitX2 - TestInitX1,
        vectorDefinition.getX2() - vectorDefinition.getX1(),
        NoDifferenceAllowed);
    assertEquals(
        TestInitY2 - TestInitY1,
        vectorDefinition.getY2() - vectorDefinition.getY1(),
        NoDifferenceAllowed);
  }
コード例 #2
0
 @Test
 public final void testRotate() {
   vectorDefinition.Rotate(TestRotation);
   assertEquals(TestRotatedX, vectorDefinition.getX2(), TestRotationAllowedDifference);
   assertEquals(TestRotatedY, vectorDefinition.getY2(), TestRotationAllowedDifference);
 }
コード例 #3
0
 @Test
 public final void testShiftOrigin() {
   vectorDefinition.shiftOrigin();
   assertEquals(TestShiftedX2, vectorDefinition.getX2(), NoDifferenceAllowed);
   assertEquals(TestShiftedY2, vectorDefinition.getY2(), NoDifferenceAllowed);
 }
コード例 #4
0
 @Test
 public final void testSetLength() {
   vectorDefinition.setLength(TestNewLength);
   assertEquals(TestNewLength, vectorDefinition.getLength(), NoDifferenceAllowed);
 }
コード例 #5
0
 @Test
 public final void testScale() {
   vectorDefinition.Scale(TestScale);
   assertEquals(TestInitX2 * TestScale, vectorDefinition.getX2(), NoDifferenceAllowed);
   assertEquals(TestInitY2 * TestScale, vectorDefinition.getY2(), NoDifferenceAllowed);
 }
コード例 #6
0
 @Test
 public final void testGetLength() {
   assertEquals(TestInitLength, vectorDefinition.getLength(), NoDifferenceAllowed);
 }
コード例 #7
0
 @Test
 public final void testGetPointEnd() {
   I2DPoint resultPoint = vectorDefinition.getPointEnd();
   assertEquals(TestInitX2, resultPoint.getX(), NoDifferenceAllowed);
   assertEquals(TestInitY2, resultPoint.getY(), NoDifferenceAllowed);
 }
コード例 #8
0
 @Test
 public final void testSetY2() {
   vectorDefinition.setY2(TestNewY2);
   assertEquals(TestNewY2, vectorDefinition.getY2(), NoDifferenceAllowed);
 }