Exemple #1
0
  @Test
  public void shouldNotBeEqualToAnotherPositionIfTheirCodesAreNotEqual() {

    JobPosition other = new JobPosition(position.getCode() + "X");

    assertThat(position, is(not(equalTo(other))));
  }
Exemple #2
0
  @Test
  public void equalsAnotherPositionWithTheSameCode() {

    JobPosition other = new JobPosition(position.getCode());

    assertThat(position, is(equalTo(other)));
    assertThat(position.hashCode(), is(other.hashCode()));
  }