public void HighestInGroupIsReturned() { var score1 = new ScoredRelatedInterestDto(1, 4f, "", false, false, 0); var score2 = new ScoredRelatedInterestDto(1, 16f, "", false, false, 0); var scoredInterests = new List<ScoredRelatedInterestDto> { score1, score2 }; var returnedInterests = _highestScoreCalculator.CalculateHighestScores(scoredInterests); Assert.That(returnedInterests.Single(), Is.EqualTo(score2)); }
public void ExplicitSearchIncreasesScore() { var score1 = new ScoredRelatedInterestDto(0, 4, "", false, true, 0); var userSearchPipelineResult = new UserSearchPipelineResult { ScoredInterests = new List<ScoredRelatedInterestDto> { score1 } }; _calculateExplicitSearchInterestScoreFilter.Filter(userSearchPipelineResult, null); Assert.That(userSearchPipelineResult.ScoredInterests.Single().Score, Is.EqualTo(20f)); }