Permalink
Browse files

Move build reviewer list method from test to ReviewerBuilder.

  • Loading branch information...
1 parent 84a9d46 commit a0684ab3563a7e7ab952f08003d8a1e5abbec456 @robertgreiner committed Nov 14, 2011
Showing with 15 additions and 15 deletions.
  1. +2 −14 Recommender.Tests/Common/RankReviewersTests.cs
  2. +13 −1 Recommender/Data/ReviewerBuilder.cs
@@ -18,20 +18,8 @@ class RankReviewersTests
public void SetUp()
{
var currentUser = BuildCurrentUser();
- reviewers = BuildReviewers();
-
- sortedReviewers = new RankReviewers(BuildCurrentUser(), BuildReviewers()).Rank();
- }
-
- private List<Reviewer> BuildReviewers()
- {
- return new List<Reviewer>
- {
- {ReviewerBuilder.BuildReviewer2()},
- {ReviewerBuilder.BuildReviewer3()},
- {ReviewerBuilder.BuildReviewer4()},
- {ReviewerBuilder.BuildReviewer5()},
- };
+ reviewers = ReviewerBuilder.BuildReviewers();
+ sortedReviewers = new RankReviewers(currentUser, reviewers).Rank();
}
private static Reviewer BuildCurrentUser()
@@ -1,4 +1,5 @@
-using Recommender.Reviews;
+using System.Collections.Generic;
+using Recommender.Reviews;
namespace Recommender.Data
{
@@ -173,5 +174,16 @@ public static Reviewer BuildReviewerWithInvalidReviews()
reviewer.AddReview("C# in Depth", -2.0);
return reviewer;
}
+
+ public static List<Reviewer> BuildReviewers()
+ {
+ return new List<Reviewer>
+ {
+ {BuildReviewer2()},
+ {BuildReviewer3()},
+ {BuildReviewer4()},
+ {BuildReviewer5()},
+ };
+ }
}
}

0 comments on commit a0684ab

Please sign in to comment.