Permalink
Browse files

added test for when two reviewers have valid reviews but no similar r…

…eviews
  • Loading branch information...
1 parent da2eff4 commit fd57025a7ad136d91fa4bc8760ee42ddebc56649 @robertgreiner committed Nov 2, 2011
Showing with 10 additions and 0 deletions.
  1. +10 −0 Recommender.Tests/Steps/SumDifferenceSquaresTests.cs
@@ -18,6 +18,16 @@ public void ShouldReturnZeroOnEmpty()
}
[Test]
+ public void ShouldReturnZeroWithNoSimilarReviews()
+ {
+ var highScoreReviewer = ReviewerBuilder.BuildAllMaxScores();
+ var lowScoreReviewer = ReviewerBuilder.BuildAllMidScores();
+ var similarReviews = new List<string>();
+ var sumDifferenceSquares = new SumDifferenceSquares(similarReviews, highScoreReviewer.Reviews, lowScoreReviewer.Reviews).Calculate();
+ Assert.AreEqual(0.0, sumDifferenceSquares);
+ }
+
+ [Test]
public void ShouldReturnZeroWithIdenticalReviews()
{
var highScoreReviewer = ReviewerBuilder.BuildOneReviewMax();

0 comments on commit fd57025

Please sign in to comment.