use of org.assertj.core.data.Index in project assertj-core by joel-costigliola.
the class FloatArrays_assertContains_at_Index_Test method should_fail_if_actual_does_not_contain_value_at_index.
@Test
public void should_fail_if_actual_does_not_contain_value_at_index() {
float value = 6f;
AssertionInfo info = someInfo();
Index index = atIndex(1);
try {
arrays.assertContains(info, actual, value, index);
} catch (AssertionError e) {
verify(failures).failure(info, shouldContainAtIndex(actual, value, index, 8f));
return;
}
failBecauseExpectedAssertionErrorWasNotThrown();
}
use of org.assertj.core.data.Index in project assertj-core by joel-costigliola.
the class FloatArrays_assertDoesNotContain_at_Index_Test method should_fail_if_actual_contains_value_at_index.
@Test
public void should_fail_if_actual_contains_value_at_index() {
AssertionInfo info = someInfo();
Index index = atIndex(0);
try {
arrays.assertDoesNotContain(info, actual, 6f, index);
} catch (AssertionError e) {
verify(failures).failure(info, shouldNotContainAtIndex(actual, 6f, index));
return;
}
failBecauseExpectedAssertionErrorWasNotThrown();
}
use of org.assertj.core.data.Index in project assertj-core by joel-costigliola.
the class DoubleArrays_assertDoesNotContain_at_Index_Test method should_fail_if_actual_contains_value_at_index_according_to_custom_comparison_strategy.
@Test
public void should_fail_if_actual_contains_value_at_index_according_to_custom_comparison_strategy() {
Index index = atIndex(0);
thrown.expectAssertionError(shouldNotContainAtIndex(actual, 6d, index, absValueComparisonStrategy));
arraysWithCustomComparisonStrategy.assertDoesNotContain(someInfo(), actual, 6d, index);
}
use of org.assertj.core.data.Index in project assertj-core by joel-costigliola.
the class LongArrays_assertContains_at_Index_Test method should_fail_if_actual_does_not_contain_value_at_index.
@Test
public void should_fail_if_actual_does_not_contain_value_at_index() {
AssertionInfo info = someInfo();
long value = 6;
Index index = atIndex(1);
try {
arrays.assertContains(info, actual, value, index);
} catch (AssertionError e) {
verify(failures).failure(info, shouldContainAtIndex(actual, value, index, 8L));
return;
}
failBecauseExpectedAssertionErrorWasNotThrown();
}
use of org.assertj.core.data.Index in project assertj-core by joel-costigliola.
the class LongArrays_assertDoesNotContain_at_Index_Test method should_fail_if_actual_contains_value_at_index_according_to_custom_comparison_strategy.
@Test
public void should_fail_if_actual_contains_value_at_index_according_to_custom_comparison_strategy() {
AssertionInfo info = someInfo();
Index index = atIndex(0);
try {
arraysWithCustomComparisonStrategy.assertDoesNotContain(info, actual, 6L, index);
} catch (AssertionError e) {
verify(failures).failure(info, shouldNotContainAtIndex(actual, 6L, index, absValueComparisonStrategy));
return;
}
failBecauseExpectedAssertionErrorWasNotThrown();
}
Aggregations