public class PrototypeComparableExpectation<T extends Comparable<T>> extends PrototypeObjectExpectation<T>
| Constructor and Description |
|---|
PrototypeComparableExpectation(Prototype<?> prototype,
PrototypeProperty property) |
| Modifier and Type | Method and Description |
|---|---|
void |
isComparableTo(T expectedValue)
Set an expectation that the property value is comparable to a value.
|
hasExpectation, isEqualTo, isInstanceOf, isNotEqualTo, isNotNull, isNull, isOneOf, isOneOf, matchespublic PrototypeComparableExpectation(Prototype<?> prototype, PrototypeProperty property)
public void isComparableTo(T expectedValue)
MyObject expected = prototype(MyObject.class);
expect(expected.number()).isComparableTo(new BigDecimal("1.01");;
expectThat(actual).matches(expected);
expectedValue - the type this property should be comparable toCopyright © 2015. All rights reserved.