예제 #1
0
  @Test
  public void shouldReturnRangeThreeToTarget() {
    when(targetCoordinate.getDistanceTo(agentCoordinate)).thenReturn(RANGE_THREE_DISTANCE);

    assertThat(underTest.getRangeToTarget(target), is(3));
  }
예제 #2
0
 private void mockCoordinates() {
   when(agentPosition.getCenter()).thenReturn(agentCoordinate);
   when(targetCoordinate.getDistanceTo(agentCoordinate)).thenReturn(RANGE_THREE_DISTANCE);
 }