use of org.assertj.core.api.AssertionInfo in project assertj-core by joel-costigliola.
the class Integers_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 {
integersWithAbsValueComparisonStrategy.assertGreaterThanOrEqualTo(info, 6, -8);
} catch (AssertionError e) {
verify(failures).failure(info, shouldBeGreaterOrEqual(6, -8, absValueComparisonStrategy));
return;
}
failBecauseExpectedAssertionErrorWasNotThrown();
}
use of org.assertj.core.api.AssertionInfo in project assertj-core by joel-costigliola.
the class Integers_assertGreaterThan_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 {
integers.assertGreaterThan(info, 6, 8);
} catch (AssertionError e) {
verify(failures).failure(info, shouldBeGreater(6, 8));
return;
}
failBecauseExpectedAssertionErrorWasNotThrown();
}
use of org.assertj.core.api.AssertionInfo in project assertj-core by joel-costigliola.
the class Integers_assertGreaterThan_Test method should_fail_if_actual_is_equal_to_other.
@Test
public void should_fail_if_actual_is_equal_to_other() {
AssertionInfo info = someInfo();
try {
integers.assertGreaterThan(info, 6, 6);
} catch (AssertionError e) {
verify(failures).failure(info, shouldBeGreater(6, 6, StandardComparisonStrategy.instance()));
return;
}
failBecauseExpectedAssertionErrorWasNotThrown();
}
use of org.assertj.core.api.AssertionInfo in project assertj-core by joel-costigliola.
the class Integers_assertGreaterThan_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 {
integersWithAbsValueComparisonStrategy.assertGreaterThan(info, -6, -8);
} catch (AssertionError e) {
verify(failures).failure(info, shouldBeGreater(-6, -8, absValueComparisonStrategy));
return;
}
failBecauseExpectedAssertionErrorWasNotThrown();
}
use of org.assertj.core.api.AssertionInfo in project assertj-core by joel-costigliola.
the class Integers_assertIsBetween_Test method should_fail_if_actual_is_not_in_range_start.
@Test
public void should_fail_if_actual_is_not_in_range_start() {
AssertionInfo info = someInfo();
try {
integers.assertIsBetween(info, ONE, TWO, TEN);
} catch (AssertionError e) {
verify(failures).failure(info, shouldBeBetween(ONE, TWO, TEN, true, true));
return;
}
failBecauseExpectedAssertionErrorWasNotThrown();
}
Aggregations