Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Move build reviewer list method from test to ReviewerBuilder.

  • Loading branch information...
commit a0684ab3563a7e7ab952f08003d8a1e5abbec456 1 parent 84a9d46
@robertgreiner authored
View
16 Recommender.Tests/Common/RankReviewersTests.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()
View
14 Recommender/Data/ReviewerBuilder.cs
@@ -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()},
+ };
+ }
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.