Пример #1
0
  @Test
  public void totalLengthTest() {

    Length first = new Length(4, 20);
    Length second = new Length(2, 155);

    Length finalLength = first.addLengths(second);

    assertEquals(7, finalLength.getMeter());
    assertEquals(75, finalLength.getCentimeter());
  }
Пример #2
0
 @Test
 public void compareLength() {
   Length first = new Length(2, 30);
   Length second = new Length(0, 230);
   assertTrue(first.compareLengths(second));
 }