Esempio n. 1
0
  @Test
  public void shouldNotBeEqualToAnotherPositionIfTheirCodesAreNotEqual() {

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

    assertThat(position, is(not(equalTo(other))));
  }
Esempio n. 2
0
  @Test
  public void equalsAnotherPositionWithTheSameCode() {

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

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