Пример #1
0
 @Test
 public void addReturnsExpectedPosition() {
   Position expected = new Position(ROW + 1, COL - 3);
   assertEquals(expected, position.add(new Position(1, -3)));
 }
Пример #2
0
 @Test
 public void addDoesNotAffectOriginalPosition() {
   Position clone = position.clone();
   position.add(new Position(1, -3));
   assertEquals(clone, position);
 }