R
- The return type.public class FluentComparableAssertion<R> extends FluentObjectAssertion<R>
Constructor and Description |
---|
FluentComparableAssertion(Assertion creator,
Comparable value,
R returns)
Constructor.
|
FluentComparableAssertion(Comparable value,
R returns)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected int |
compareTo(Object value)
Perform a comparison with the specified object.
|
R |
isBetween(Comparable lower,
Comparable upper)
Asserts that the value is between (inclusive) the specified upper and lower values.
|
R |
isGreaterThan(Comparable value)
Asserts that the value is greater than the specified value.
|
R |
isGreaterThanOrEqual(Comparable value)
Asserts that the value is greater than or equal to the specified value.
|
R |
isGt(Comparable value)
Asserts that the value is greater than the specified value.
|
R |
isGte(Comparable value)
Asserts that the value is greater than or equal to the specified value.
|
R |
isLessThan(Comparable value)
Asserts that the value is less than the specified value.
|
R |
isLessThanOrEqual(Comparable value)
Asserts that the value is less than or equals to the specified value.
|
R |
isLt(Comparable value)
Asserts that the value is less than the specified value.
|
R |
isLte(Comparable value)
Asserts that the value is less than or equals to the specified value.
|
FluentComparableAssertion<R> |
msg(String msg,
Object... args)
Allows to to specify the assertion failure message.
|
FluentComparableAssertion<R> |
stderr()
If an error occurs, send the error message to STDERR.
|
FluentComparableAssertion<R> |
stdout()
If an error occurs, send the error message to STDOUT.
|
doesNotEqual, doesNotExist, equivalent, exists, is, isAny, isEqual, isNot, isNotAny, isNotNull, isNull, isType, json, jsonSorted, passes, passes, sameAs, sameAsSerialized, sameAsSorted, serialized, string, string, string
returns
assertNotNull, assertNotNull, className, error
public FluentComparableAssertion(Comparable value, R returns)
value
- The value being tested.returns
- The object to return after the test.public FluentComparableAssertion(Assertion creator, Comparable value, R returns)
creator
- The assertion that created this assertion.value
- The value being tested.returns
- The object to return after the test.public R isGreaterThan(Comparable value) throws AssertionError
value
- The values to check against.AssertionError
- If assertion failed.public R isGt(Comparable value) throws AssertionError
Equivalent to isGreaterThan(Comparable)
value
- The values to check against.AssertionError
- If assertion failed.public R isGreaterThanOrEqual(Comparable value) throws AssertionError
value
- The values to check against.AssertionError
- If assertion failed.public R isGte(Comparable value) throws AssertionError
Equivalent to isGreaterThanOrEqual(Comparable)
value
- The values to check against.AssertionError
- If assertion failed.public R isLessThan(Comparable value) throws AssertionError
value
- The values to check against.AssertionError
- If assertion failed.public R isLt(Comparable value) throws AssertionError
Equivalent to isLessThan(Comparable)
value
- The values to check against.AssertionError
- If assertion failed.public R isLessThanOrEqual(Comparable value) throws AssertionError
value
- The values to check against.AssertionError
- If assertion failed.public R isLte(Comparable value) throws AssertionError
Equivalent to isLessThanOrEqual(Comparable)
value
- The values to check against.AssertionError
- If assertion failed.public R isBetween(Comparable lower, Comparable upper) throws AssertionError
lower
- The lower value to check against.upper
- The upper value to check against.AssertionError
- If assertion failed.protected int compareTo(Object value)
value
- The object to compare against.public FluentComparableAssertion<R> msg(String msg, Object... args)
Assertion
String can contain
msg
in class FluentObjectAssertion<R>
msg
- The assertion failure message.args
- Optional message arguments.public FluentComparableAssertion<R> stderr()
Assertion
stderr
in class FluentObjectAssertion<R>
public FluentComparableAssertion<R> stdout()
Assertion
stdout
in class FluentObjectAssertion<R>
Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.