コード例 #1
0
  @Test
  public void score_is_0_when_no_match() {

    initializeNoMatchCriterion();

    profile.matches(criteria);

    assertThat(profile.score(), is(0));
  }
コード例 #2
0
  @Test
  public void score_is_sum_when_some_match() {

    initializeSomeMatchCriteria();

    int score = Weight.Important.getValue() * 2;

    profile.matches(criteria);

    assertThat(profile.score(), is(score));
  }
コード例 #3
0
 @Test
 public void score_is_0_when_empty() {
   profile.matches(criteria);
   assertThat(profile.score(), is(0));
 }