public abstract class Numbers<NUMBER extends Comparable<NUMBER>> extends Comparables
Constructor and Description |
---|
Numbers() |
Numbers(ComparisonStrategy comparisonStrategy) |
Modifier and Type | Method and Description |
---|---|
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 |
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() |
areEqual, assertEqual, assertEqualByComparison, assertGreaterThan, assertGreaterThanOrEqualTo, assertLessThan, assertLessThanOrEqualTo, assertNotEqual, assertNotEqualByComparison, assertNotNull, getComparator, instance
public Numbers()
public Numbers(ComparisonStrategy comparisonStrategy)
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.Copyright © 2013 AssertJ. All Rights Reserved.