use of org.assertj.core.api.AssertionInfo in project assertj-core by joel-costigliola.
the class BigDecimals_assertEqualByComparison_Test method should_fail_if_big_decimals_are_not_equal_by_comparison_whatever_custom_comparison_strategy_is.
@Test
public void should_fail_if_big_decimals_are_not_equal_by_comparison_whatever_custom_comparison_strategy_is() {
AssertionInfo info = someInfo();
try {
numbersWithAbsValueComparisonStrategy.assertEqualByComparison(info, TEN, ONE);
} catch (AssertionError e) {
verify(failures).failure(info, shouldBeEqual(TEN, ONE, absValueComparisonStrategy, new StandardRepresentation()));
return;
}
failBecauseExpectedAssertionErrorWasNotThrown();
}
use of org.assertj.core.api.AssertionInfo in project assertj-core by joel-costigliola.
the class BigDecimals_assertEqual_Test method should_fail_if_big_decimals_are_not_equal.
@Test
public void should_fail_if_big_decimals_are_not_equal() {
AssertionInfo info = someInfo();
try {
numbers.assertEqual(info, ONE_WITH_3_DECIMALS, ONE);
} catch (AssertionError e) {
verify(failures).failure(info, shouldBeEqual(ONE_WITH_3_DECIMALS, ONE, info.representation()));
return;
}
failBecauseExpectedAssertionErrorWasNotThrown();
}
use of org.assertj.core.api.AssertionInfo in project assertj-core by joel-costigliola.
the class BigDecimals_assertGreaterThanOrEqualTo_Test method should_fail_if_actual_is_less_than_other.
@Test
public void should_fail_if_actual_is_less_than_other() {
AssertionInfo info = someInfo();
try {
numbers.assertGreaterThanOrEqualTo(info, ONE, TEN);
} catch (AssertionError e) {
verify(failures).failure(info, shouldBeGreaterOrEqual(ONE, TEN));
return;
}
failBecauseExpectedAssertionErrorWasNotThrown();
}
use of org.assertj.core.api.AssertionInfo in project assertj-core by joel-costigliola.
the class BigDecimals_assertGreaterThanOrEqualTo_Test method should_fail_if_actual_is_less_than_other_according_to_custom_comparison_strategy.
@Test
public void should_fail_if_actual_is_less_than_other_according_to_custom_comparison_strategy() {
AssertionInfo info = someInfo();
try {
numbersWithAbsValueComparisonStrategy.assertGreaterThanOrEqualTo(info, ONE, TEN.negate());
} catch (AssertionError e) {
verify(failures).failure(info, shouldBeGreaterOrEqual(ONE, TEN.negate(), absValueComparisonStrategy));
return;
}
failBecauseExpectedAssertionErrorWasNotThrown();
}
use of org.assertj.core.api.AssertionInfo in project assertj-core by joel-costigliola.
the class BigDecimals_assertGreaterThan_Test method should_fail_if_actual_is_equal_to_other_according_to_custom_comparison_strategy.
@Test
public void should_fail_if_actual_is_equal_to_other_according_to_custom_comparison_strategy() {
AssertionInfo info = someInfo();
try {
numbersWithAbsValueComparisonStrategy.assertGreaterThan(info, TEN.negate(), TEN);
} catch (AssertionError e) {
verify(failures).failure(info, shouldBeGreater(TEN.negate(), TEN, absValueComparisonStrategy));
return;
}
failBecauseExpectedAssertionErrorWasNotThrown();
}
Aggregations