Browse Source

Test: junitTest vector2 iswithin

remotes/origin/ghostsbehaviour
fdai2751 11 months ago
parent
commit
e23fc6dce7
  1. 12
      src/test/java/pacmanTests/Vector2Test.java

12
src/test/java/pacmanTests/Vector2Test.java

@ -93,4 +93,16 @@ class Vector2Test {
// assert // assert
assertThat(isWithin).isEqualTo(expectedWithin); assertThat(isWithin).isEqualTo(expectedWithin);
} }
@Test
void Vector2_isWithin_returnsFalseWhenWithin() {
// arrange
Vector2 area = new Vector2(25, 30);
Vector2 point = new Vector2(7, 12);
// act
boolean isWithin = point.isWithin(area);
boolean expectedWithin = true;
// assert
assertThat(isWithin).isEqualTo(expectedWithin);
}
} }
Loading…
Cancel
Save