Search in sources :

Example 66 with AssertionInfo

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);
}
Also used : AssertionInfo(org.assertj.core.api.AssertionInfo) FloatsBaseTest(org.assertj.core.internal.FloatsBaseTest) Test(org.junit.Test)

Example 67 with AssertionInfo

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();
}
Also used : AssertionInfo(org.assertj.core.api.AssertionInfo) FloatsBaseTest(org.assertj.core.internal.FloatsBaseTest) Test(org.junit.Test)

Example 68 with AssertionInfo

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();
}
Also used : AssertionInfo(org.assertj.core.api.AssertionInfo) FloatsBaseTest(org.assertj.core.internal.FloatsBaseTest) Test(org.junit.Test)

Example 69 with AssertionInfo

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();
}
Also used : AssertionInfo(org.assertj.core.api.AssertionInfo) FloatsBaseTest(org.assertj.core.internal.FloatsBaseTest) Test(org.junit.Test)

Example 70 with AssertionInfo

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();
}
Also used : AssertionInfo(org.assertj.core.api.AssertionInfo) FloatsBaseTest(org.assertj.core.internal.FloatsBaseTest) Test(org.junit.Test)

Aggregations

AssertionInfo (org.assertj.core.api.AssertionInfo)1174 Test (org.junit.Test)1172 IterablesBaseTest (org.assertj.core.internal.IterablesBaseTest)94 DatesBaseTest (org.assertj.core.internal.DatesBaseTest)92 ByteArraysBaseTest (org.assertj.core.internal.ByteArraysBaseTest)84 ObjectArraysBaseTest (org.assertj.core.internal.ObjectArraysBaseTest)84 Date (java.util.Date)60 CharArraysBaseTest (org.assertj.core.internal.CharArraysBaseTest)47 FloatArraysBaseTest (org.assertj.core.internal.FloatArraysBaseTest)47 IntArraysBaseTest (org.assertj.core.internal.IntArraysBaseTest)47 LongArraysBaseTest (org.assertj.core.internal.LongArraysBaseTest)47 MapsBaseTest (org.assertj.core.internal.MapsBaseTest)47 ShortArraysBaseTest (org.assertj.core.internal.ShortArraysBaseTest)47 BigIntegersBaseTest (org.assertj.core.internal.BigIntegersBaseTest)44 BigDecimalsBaseTest (org.assertj.core.internal.BigDecimalsBaseTest)42 Index (org.assertj.core.data.Index)40 Index.atIndex (org.assertj.core.data.Index.atIndex)40 ObjectsBaseTest (org.assertj.core.internal.ObjectsBaseTest)40 DataProvider (com.tngtech.java.junit.dataprovider.DataProvider)34 DoublesBaseTest (org.assertj.core.internal.DoublesBaseTest)33