|
|||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| GreaterThanConstraint.java | - | 100% | 100% | 100% |
|
||||||||||||||
| 1 | package com.agical.rmock.core.match.constraint; | |
| 2 | ||
| 3 | ||
| 4 | ||
| 5 | /** | |
| 6 | * <em>(c) Agical AB 2005</em> | |
| 7 | * @author joakim.ohlrogge | |
| 8 | * | |
| 9 | ||
| 10 | * | |
| 11 | * Matches Comparable objects that returns that the compared object is greater than the reference. | |
| 12 | */ | |
| 13 | public class GreaterThanConstraint extends AbstractConstraint{ | |
| 14 | ||
| 15 | /** | |
| 16 | * @param ref | |
| 17 | */ | |
| 18 | 17 | public GreaterThanConstraint(Object ref) { |
| 19 | 17 | super("greaterThan", ref); |
| 20 | } | |
| 21 | ||
| 22 | /** | |
| 23 | * @see com.agical.rmock.core.match.Constraint#passes(java.lang.Object) | |
| 24 | */ | |
| 25 | 17 | public boolean passes(Object object) { |
| 26 | 17 | return getReference().objectCompareTo(object) < 0; |
| 27 | } | |
| 28 | } |
|
||||||||||