Coverage Report - net.sf.cotta.test.matcher.GreaterThanMatecher
 
Classes in this File Line Coverage Branch Coverage Complexity
GreaterThanMatecher
100%
6/6
100%
2/2
1
 
 1  
 package net.sf.cotta.test.matcher;
 2  
 
 3  
 import org.hamcrest.BaseMatcher;
 4  
 import org.hamcrest.Description;
 5  
 
 6  
 public class GreaterThanMatecher<T extends Comparable<K>, K> extends BaseMatcher<T> {
 7  
   private T value;
 8  
 
 9  2
   public GreaterThanMatecher(T value) {
 10  2
     this.value = value;
 11  2
   }
 12  
 
 13  
   @SuppressWarnings({"unchecked"})
 14  
   public boolean matches(Object o) {
 15  2
     return value.compareTo((K) o) < 0;
 16  
   }
 17  
 
 18  
   public void describeTo(Description description) {
 19  1
     description.appendText("greater than ").appendValue(value);
 20  1
   }
 21  
 }