Ejemplo n.º 1
0
  @Test
  public void shouldReturnRangeThreeToTarget() {
    when(targetCoordinate.getDistanceTo(agentCoordinate)).thenReturn(RANGE_THREE_DISTANCE);

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