use of org.assertj.core.api.AssertionInfo in project assertj-core by joel-costigliola.
the class Floats_assertIsStrictlyBetween_Test method should_fail_if_actual_is_not_in_range_end.
@Test
public void should_fail_if_actual_is_not_in_range_end() {
thrown.expectIllegalArgumentException("The end value <0.0> must not be less than or equal to the start value <0.0>!");
AssertionInfo info = someInfo();
floats.assertIsStrictlyBetween(info, ONE, ZERO, ZERO);
}
use of org.assertj.core.api.AssertionInfo in project assertj-core by joel-costigliola.
the class Floats_assertIsStrictlyBetween_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 {
floats.assertIsStrictlyBetween(info, ONE, TWO, TEN);
} catch (AssertionError e) {
verify(failures).failure(info, shouldBeBetween(ONE, TWO, TEN, false, false));
return;
}
failBecauseExpectedAssertionErrorWasNotThrown();
}
use of org.assertj.core.api.AssertionInfo in project assertj-core by joel-costigliola.
the class Floats_assertIsStrictlyBetween_Test method should_fail_if_actual_is_equal_to_range_start.
@Test
public void should_fail_if_actual_is_equal_to_range_start() {
AssertionInfo info = someInfo();
try {
floats.assertIsStrictlyBetween(info, ONE, ONE, TEN);
} catch (AssertionError e) {
verify(failures).failure(info, shouldBeBetween(ONE, ONE, TEN, false, false));
return;
}
failBecauseExpectedAssertionErrorWasNotThrown();
}
use of org.assertj.core.api.AssertionInfo in project assertj-core by joel-costigliola.
the class Floats_assertLessThanOrEqualTo_Test method should_fail_if_actual_is_greater_than_other.
@Test
public void should_fail_if_actual_is_greater_than_other() {
AssertionInfo info = someInfo();
try {
floats.assertLessThanOrEqualTo(info, 8f, 6f);
} catch (AssertionError e) {
verify(failures).failure(info, shouldBeLessOrEqual(8f, 6f));
return;
}
failBecauseExpectedAssertionErrorWasNotThrown();
}
use of org.assertj.core.api.AssertionInfo in project assertj-core by joel-costigliola.
the class Floats_assertLessThan_Test method should_fail_if_actual_is_greater_than_other.
@Test
public void should_fail_if_actual_is_greater_than_other() {
AssertionInfo info = someInfo();
try {
floats.assertLessThan(info, 8f, 6f);
} catch (AssertionError e) {
verify(failures).failure(info, shouldBeLess(8f, 6f));
return;
}
failBecauseExpectedAssertionErrorWasNotThrown();
}
Aggregations