Skip to content
Browse files

pushed to version 1.1,including factory

  • Loading branch information...
1 parent 026c68e commit a444c8e508fd65b89279df6224d1f71ed8be23b2 unknown committed Aug 12, 2012
View
7 README.md
@@ -1,4 +1,9 @@
Reviewable
==========
-A simple library to enable Reviewers to review Reviewables, leveraging best practice modern software engineering techniques
+A simple library to enable Reviewers to review Reviewables, leveraging best practice modern software engineering techniques
+
+CHANGELOG
+==========
+v 1.0 8/10/12 Initial release
+v 1.1 8/11/12 Added ABSTRACT FACTORY for Review. Refactored stubs
View
2 pom.xml
@@ -4,7 +4,7 @@
<groupId>com.visionarysoftwaresolutions</groupId>
<artifactId>reviewable</artifactId>
<packaging>jar</packaging>
- <version>1.0</version>
+ <version>1.1</version>
<name>Reviewable</name>
<url>http://www.github.com/leadVisionary/reviewable</url>
<description>A simple library library for Reviewable entities. Defines semantics for Reviewers to be able to review Reviews </description>
View
6 ...lutions/reviewable/stubs/DatedReview.java → ...waresolutions/reviewable/DatedReview.java
@@ -1,12 +1,12 @@
-package com.visionarysoftwaresolutions.reviewable.stubs;
+package com.visionarysoftwaresolutions.reviewable;
import com.visionarysoftwaresolutions.reviewable.Review;
import com.visionarysoftwaresolutions.reviewable.ReviewDecorator;
import java.util.Date;
-public class DatedReview extends ReviewDecorator {
+class DatedReview extends ReviewDecorator {
- private Date date;
+ private final Date date;
public DatedReview(Review review){
super(review);
View
6 ...twaresolutions/reviewable/stubs/Food.java → ...arysoftwaresolutions/reviewable/Food.java
@@ -1,11 +1,11 @@
-package com.visionarysoftwaresolutions.reviewable.stubs;
+package com.visionarysoftwaresolutions.reviewable;
import com.visionarysoftwaresolutions.reviewable.Review;
import com.visionarysoftwaresolutions.reviewable.Reviewable;
import com.visionarysoftwaresolutions.reviewable.Reviewer;
-public class Food implements Reviewable {
- private String name;
+class Food implements Reviewable {
+ private final String name;
public Food(String string) {
name = string;
View
4 ...olutions/reviewable/stubs/FoodReview.java → ...twaresolutions/reviewable/FoodReview.java
@@ -1,10 +1,10 @@
-package com.visionarysoftwaresolutions.reviewable.stubs;
+package com.visionarysoftwaresolutions.reviewable;
import com.visionarysoftwaresolutions.reviewable.Review;
import com.visionarysoftwaresolutions.reviewable.Reviewable;
import com.visionarysoftwaresolutions.reviewable.Reviewer;
-public final class FoodReview implements Review {
+final class FoodReview implements Review {
private final String description;
private final Reviewer reviewer;
private final Reviewable reviewed;
View
11 src/test/java/com/visionarysoftwaresolutions/reviewable/ReviewableTest.java
@@ -1,6 +1,5 @@
package com.visionarysoftwaresolutions.reviewable;
-import com.visionarysoftwaresolutions.reviewable.stubs.*;
import org.junit.Test;
import static org.junit.Assert.*;
@@ -22,18 +21,16 @@ public void testReview() {
@Test
public void testReviewDecorator(){
- //Given I'm reviewing something today
- java.util.Date today = new java.util.Date();
//When I have a reviewer rate a reviewable
Review result = nick.review(food,
"It is so creamy and delicious!");
//And I want a Dated Review
DatedReview datedResult = new DatedReview(result);
//Then it is rated
- assertEquals(datedResult.getReviewer(), nick);
- assertEquals(datedResult.getReviewed(), food);
- assertEquals(-1, today.compareTo(datedResult.getDate()));
- assertEquals("It is so creamy and delicious! on " + today,
+ assertEquals(nick, datedResult.getReviewer());
+ assertEquals(food, datedResult.getReviewed());
+ assertNotNull(datedResult.getDate());
+ assertEquals("It is so creamy and delicious! on " + datedResult.getDate(),
datedResult.getDescription());
}
View
4 ...s/reviewable/stubs/StubReviewFactory.java → ...lutions/reviewable/StubReviewFactory.java
@@ -1,11 +1,11 @@
-package com.visionarysoftwaresolutions.reviewable.stubs;
+package com.visionarysoftwaresolutions.reviewable;
import com.visionarysoftwaresolutions.reviewable.Review;
import com.visionarysoftwaresolutions.reviewable.ReviewFactory;
import com.visionarysoftwaresolutions.reviewable.Reviewable;
import com.visionarysoftwaresolutions.reviewable.Reviewer;
-public class StubReviewFactory implements ReviewFactory {
+final class StubReviewFactory implements ReviewFactory {
private boolean wantsDate = true;
@Override
View
6 ...twaresolutions/reviewable/stubs/User.java → ...arysoftwaresolutions/reviewable/User.java
@@ -1,11 +1,11 @@
-package com.visionarysoftwaresolutions.reviewable.stubs;
+package com.visionarysoftwaresolutions.reviewable;
import com.visionarysoftwaresolutions.reviewable.Review;
import com.visionarysoftwaresolutions.reviewable.Reviewable;
import com.visionarysoftwaresolutions.reviewable.Reviewer;
-public class User implements Reviewer {
- private String name;
+final class User implements Reviewer {
+ private final String name;
public User(String string) {
name = string;

0 comments on commit a444c8e

Please sign in to comment.
Something went wrong with that request. Please try again.