Browse files

created Rater interface in preparation of splitting into different pi…

…eces
  • Loading branch information...
1 parent 1723c3a commit 996d3322493b36eab082cb47758b781cb86f10d2 unknown committed Aug 12, 2012
View
3 src/main/java/com/visionarysoftwaresolutions/reviewable/Reviewer.java
@@ -1,7 +1,5 @@
package com.visionarysoftwaresolutions.reviewable;
-import com.visionarysoftwaresolutions.reviewable.rating.RatingScale;
-import com.visionarysoftwaresolutions.reviewable.rating.RatedReview;
/**
*
@@ -13,5 +11,4 @@
*/
public interface Reviewer {
public abstract Review review(Reviewable toReview, String description);
- public abstract RatedReview rate(Reviewable toReview, String description, RatingScale scale);
}
View
8 src/main/java/com/visionarysoftwaresolutions/reviewable/rating/Rater.java
@@ -0,0 +1,8 @@
+package com.visionarysoftwaresolutions.reviewable.rating;
+
+import com.visionarysoftwaresolutions.reviewable.Reviewable;
+import com.visionarysoftwaresolutions.reviewable.Reviewer;
+
+public interface Rater extends Reviewer {
+ public abstract RatedReview rate(Reviewable toReview, String description, RatingScale scale);
+}
View
3 src/test/java/com/visionarysoftwaresolutions/reviewable/ReviewableTest.java
@@ -1,13 +1,14 @@
package com.visionarysoftwaresolutions.reviewable;
+import com.visionarysoftwaresolutions.reviewable.rating.Rater;
import com.visionarysoftwaresolutions.reviewable.rating.RatingScale;
import com.visionarysoftwaresolutions.reviewable.rating.RatedReview;
import com.visionarysoftwaresolutions.reviewable.stubs.*;
import org.junit.Test;
import static org.junit.Assert.*;
public class ReviewableTest {
- Reviewer nick = new User("nick");
+ Rater nick = new User("nick");
Reviewable food = new Food("Phonecian Cafe Hummus");
@Test
View
4 src/test/java/com/visionarysoftwaresolutions/reviewable/stubs/User.java
@@ -1,12 +1,12 @@
package com.visionarysoftwaresolutions.reviewable.stubs;
import com.visionarysoftwaresolutions.reviewable.rating.RatedReview;
+import com.visionarysoftwaresolutions.reviewable.rating.Rater;
import com.visionarysoftwaresolutions.reviewable.rating.RatingScale;
import com.visionarysoftwaresolutions.reviewable.Review;
import com.visionarysoftwaresolutions.reviewable.Reviewable;
-import com.visionarysoftwaresolutions.reviewable.Reviewer;
-public class User implements Reviewer {
+public class User implements Rater {
private String name;
public User(String string) {

0 comments on commit 996d332

Please sign in to comment.