Package org.fest.assertions.internal
Class Numbers<NUMBER extends Comparable<NUMBER>>
java.lang.Object
org.fest.assertions.internal.Comparables
org.fest.assertions.internal.Numbers<NUMBER>
- Direct Known Subclasses:
BigDecimals,Bytes,Integers,Longs,RealNumbers,Shorts
Base class of reusable assertions for numbers.
- Author:
- Joel Costigliola, Nicolas François
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidassertIsNegative(AssertionInfo info, NUMBER actual) Asserts that the actual value is negative.voidassertIsNotNegative(AssertionInfo info, NUMBER actual) Asserts that the actual value is not negative.voidassertIsNotPositive(AssertionInfo info, NUMBER actual) Asserts that the actual value is not positive.voidassertIsNotZero(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).voidassertIsPositive(AssertionInfo info, NUMBER actual) Asserts that the actual value is positive.voidassertIsZero(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 NUMBERzero()Methods inherited from class org.fest.assertions.internal.Comparables
areEqual, assertEqual, assertEqualByComparison, assertGreaterThan, assertGreaterThanOrEqualTo, assertLessThan, assertLessThanOrEqualTo, assertNotEqual, assertNotEqualByComparison, assertNotNull, getComparator, instance
-
Constructor Details
-
Numbers
public Numbers() -
Numbers
-
-
Method Details
-
zero
-
assertIsZero
Asserts that the actual value is equal to zero.
It does not rely on the custom comparisonStrategy (if one is set).- Parameters:
info- contains information about the assertion.actual- the actual value.- Throws:
AssertionError- if the actual value isnull.AssertionError- if the actual value is not equal to zero.
-
assertIsNotZero
Asserts that the actual value is not equal to zero.
It does not rely on the custom comparisonStrategy (if one is set).- Parameters:
info- contains information about the assertion.actual- the actual value.- Throws:
AssertionError- if the actual value isnull.AssertionError- if the actual value is equal to zero.
-
assertIsNegative
Asserts that the actual value is negative.- Parameters:
info- contains information about the assertion.actual- the actual value.- Throws:
AssertionError- if the actual value isnull.AssertionError- if the actual value is not negative: it is either equal to or greater than zero.
-
assertIsPositive
Asserts that the actual value is positive.- Parameters:
info- contains information about the assertion.actual- the actual value.- Throws:
AssertionError- if the actual value isnull.AssertionError- if the actual value is not positive: it is either equal to or less than zero.
-
assertIsNotNegative
Asserts that the actual value is not negative.- Parameters:
info- contains information about the assertion.actual- the actual value.- Throws:
AssertionError- if the actual value isnull.AssertionError- if the actual value is negative.
-
assertIsNotPositive
Asserts that the actual value is not positive.- Parameters:
info- contains information about the assertion.actual- the actual value.- Throws:
AssertionError- if the actual value isnull.AssertionError- if the actual value is positive.
-