Author: tobr
Date: Tue Dec  4 16:36:39 2012
New Revision: 1417024

URL: http://svn.apache.org/viewvc?rev=1417024&view=rev
Log:
changed Validators to Filters

Modified:
    
incubator/droids/branches/0.2.x-cleanup/droids-core/src/test/java/org/apache/droids/core/TestSimpleQueue.java

Modified: 
incubator/droids/branches/0.2.x-cleanup/droids-core/src/test/java/org/apache/droids/core/TestSimpleQueue.java
URL: 
http://svn.apache.org/viewvc/incubator/droids/branches/0.2.x-cleanup/droids-core/src/test/java/org/apache/droids/core/TestSimpleQueue.java?rev=1417024&r1=1417023&r2=1417024&view=diff
==============================================================================
--- 
incubator/droids/branches/0.2.x-cleanup/droids-core/src/test/java/org/apache/droids/core/TestSimpleQueue.java
 (original)
+++ 
incubator/droids/branches/0.2.x-cleanup/droids-core/src/test/java/org/apache/droids/core/TestSimpleQueue.java
 Tue Dec  4 16:36:39 2012
@@ -27,33 +27,30 @@ import org.junit.Test;
 
 public class TestSimpleQueue {
 
-       MaxDepthTaskFilter<FileTask> validator;
+       MaxDepthTaskFilter<FileTask> filter;
 
        @Before
        public final void initialize() {
-               validator = new MaxDepthTaskFilter<FileTask>();
-               validator.setMaxDepth(5);
+               filter = new MaxDepthTaskFilter<FileTask>();
+               filter.setMaxDepth(5);
        }
 
        @Test
        public void whenTaskBelowMaxDepthIsValidated_thenTaskIsValid() throws 
Exception {
                final FileTask task = new FileTask(new File(""), 3);
-               boolean isValid = validator.validate(task);
-               Assert.assertTrue(isValid);
+               Assert.assertNotNull(filter.filter(task));
        }
 
        @Test
        public void whenTaskEqualToMaxDepthIsValidated_thenTaskIsValid() throws 
Exception {
                final FileTask task = new FileTask(new File(""), 5);
-               boolean isValid = validator.validate(task);
-               Assert.assertTrue(isValid);
+               Assert.assertNotNull(filter.filter(task));
        }
 
        @Test
        public void whenTaskOverMaxDepthIsValidated_thenTaskIsNotValid() throws 
Exception {
                final FileTask task = new FileTask(new File(""), 7);
-               boolean isValid = validator.validate(task);
-               Assert.assertFalse(isValid);
+               Assert.assertNull(filter.filter(task));
        }
 
 }


Reply via email to