Exemple #1
0
  /** Tests the successful setting of the maximum angle. */
  @Test
  public void setMaximum() {
    AngleJoint aj = new AngleJoint(new Body(), new Body());
    aj.setUpperLimit(Math.toRadians(10));

    TestCase.assertEquals(Math.toRadians(10), aj.getUpperLimit(), 1e-6);
  }
Exemple #2
0
 /** Tests the failed setting of the maximum angle. */
 @Test(expected = IllegalArgumentException.class)
 public void setMaximumFail() {
   AngleJoint aj = new AngleJoint(new Body(), new Body());
   aj.setUpperLimit(Math.toRadians(-10));
 }