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