|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.assertj.core.internal.Comparables org.assertj.core.internal.Numbers<NUMBER>
public abstract class Numbers<NUMBER extends Comparable<NUMBER>>
Base class of reusable assertions for numbers.
Constructor Summary | |
---|---|
Numbers()
|
|
Numbers(ComparisonStrategy comparisonStrategy)
|
Method Summary | |
---|---|
void |
assertIsBetween(AssertionInfo info,
NUMBER actual,
NUMBER start,
NUMBER end)
Asserts that the actual value is in [start, end] range (start included, end included). |
void |
assertIsNegative(AssertionInfo info,
NUMBER actual)
Asserts that the actual value is negative. |
void |
assertIsNotNegative(AssertionInfo info,
NUMBER actual)
Asserts that the actual value is not negative. |
void |
assertIsNotPositive(AssertionInfo info,
NUMBER actual)
Asserts that the actual value is not positive. |
void |
assertIsNotZero(AssertionInfo info,
NUMBER actual)
Asserts that the actual value is not equal to zero. It does not rely on the custom comparisonStrategy (if one is set). |
void |
assertIsPositive(AssertionInfo info,
NUMBER actual)
Asserts that the actual value is positive. |
void |
assertIsStrictlyBetween(AssertionInfo info,
NUMBER actual,
NUMBER start,
NUMBER end)
Asserts that the actual value is in ]start, end[ range (start excluded, end excluded). |
void |
assertIsZero(AssertionInfo info,
NUMBER actual)
Asserts that the actual value is equal to zero. It does not rely on the custom comparisonStrategy (if one is set). |
protected abstract NUMBER |
zero()
|
Methods inherited from class org.assertj.core.internal.Comparables |
---|
areEqual, assertEqual, assertEqualByComparison, assertGreaterThan, assertGreaterThanOrEqualTo, assertIsBetween, assertLessThan, assertLessThanOrEqualTo, assertNotEqual, assertNotEqualByComparison, assertNotNull, getComparator, instance |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Numbers()
public Numbers(ComparisonStrategy comparisonStrategy)
Method Detail |
---|
protected abstract NUMBER zero()
public void assertIsZero(AssertionInfo info, NUMBER actual)
info
- contains information about the assertion.actual
- the actual value.
AssertionError
- if the actual value is null
.
AssertionError
- if the actual value is not equal to zero.public void assertIsNotZero(AssertionInfo info, NUMBER actual)
info
- contains information about the assertion.actual
- the actual value.
AssertionError
- if the actual value is null
.
AssertionError
- if the actual value is equal to zero.public void assertIsNegative(AssertionInfo info, NUMBER actual)
info
- contains information about the assertion.actual
- the actual value.
AssertionError
- if the actual value is null
.
AssertionError
- if the actual value is not negative: it is either equal to or greater than zero.public void assertIsPositive(AssertionInfo info, NUMBER actual)
info
- contains information about the assertion.actual
- the actual value.
AssertionError
- if the actual value is null
.
AssertionError
- if the actual value is not positive: it is either equal to or less than zero.public void assertIsNotNegative(AssertionInfo info, NUMBER actual)
info
- contains information about the assertion.actual
- the actual value.
AssertionError
- if the actual value is null
.
AssertionError
- if the actual value is negative.public void assertIsNotPositive(AssertionInfo info, NUMBER actual)
info
- contains information about the assertion.actual
- the actual value.
AssertionError
- if the actual value is null
.
AssertionError
- if the actual value is positive.public void assertIsBetween(AssertionInfo info, NUMBER actual, NUMBER start, NUMBER end)
info
- contains information about the assertion.actual
- the actual value.
AssertionError
- if the actual value is null
.
AssertionError
- if the actual value is positive.
NullPointerException
- if start value is null
.
NullPointerException
- if end value is null
.
AssertionError
- if the actual value is not in [start, end] range.public void assertIsStrictlyBetween(AssertionInfo info, NUMBER actual, NUMBER start, NUMBER end)
info
- contains information about the assertion.actual
- the actual value.start
- the start value (exclusive), expected not to be null.end
- the end value (exclusive), expected not to be null.
AssertionError
- if the actual value is null
.
NullPointerException
- if start value is null
.
NullPointerException
- if end value is null
.
AssertionError
- if the actual value is not in ]start, end[ range.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |