Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tree: 6e6e5930a2
Fetching contributors…

Cannot retrieve contributors at this time

49 lines (43 sloc) 1.377 kB
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using Recommender.Common;
using Recommender.Data;
using Recommender.Reviews;
using Recommender.Steps;
namespace Recommender.Tests.Steps
class SumSimilarScoresTests
private Reviewer r1;
private Reviewer r2;
private List<String> similarReviews;
public void SetUp()
r1 = ReviewerBuilder.BuildReviewer1();
r2 = ReviewerBuilder.BuildReviewer2();
similarReviews = new FindSimilarReviews(r1.Reviews, r2.Reviews).Calculate();
public void SumASingleScoreFromOneUser()
r1 = ReviewerBuilder.BuildOneReviewMax();
similarReviews = new List<string>(new String[] {"C# in Depth"});
Assert.AreEqual(5.0, new SumSimilarScores(similarReviews, r1.Reviews).Calculate());
public void ShouldSumAllOfTheScoresFromTheFirstUser()
Assert.AreEqual(18.0, new SumSimilarScores(similarReviews, r1.Reviews).Calculate());
public void ShouldSumAllOfTheScoresFromTheSecondUser()
Assert.AreEqual(19.5, new SumSimilarScores(similarReviews, r2.Reviews).Calculate());
Jump to Line
Something went wrong with that request. Please try again.