示例#1
0
 @Test
 public final void testGetPosition() {
   double pos1[] = {2, 3.5, 4};
   assertTrue(Arrays.equals(pos1, log1.getPosition()));
   double pos2[] = {2.1, 3, 0};
   assertTrue(Arrays.equals(pos2, log2.getPosition()));
 }
示例#2
0
 @Test
 public void testAdvanceTimeFalling() {
   double[] initialPos = log1.getPosition();
   log1.advanceTime(0.1);
   assertTrue(initialPos[2] > log1.getPosition()[2]);
   assertEquals(initialPos[0], log1.getPosition()[0], 0);
   assertEquals(initialPos[1], log1.getPosition()[1], 0);
 }
示例#3
0
 public void testAdvancerTimeNotFalling() {
   double[] initialPos = log2.getPosition();
   log2.advanceTime(0.1);
   assertTrue(Arrays.equals(initialPos, log2.getPosition()));
 }
示例#4
0
 @Test
 public final void testSetPositionLegalCase() {
   double[] newPos = {2, 2, 1};
   log1.setPosition(newPos);
   assertTrue(Arrays.equals(newPos, log1.getPosition()));
 }