org.assertj.core.api.AbstractIntegerAssert Java Examples
The following examples show how to use
org.assertj.core.api.AbstractIntegerAssert.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TableAssertUtils.java From cukes with Apache License 2.0 | 6 votes |
private static void assertWithSign(AbstractIntegerAssert<?> anAssert, String sign, Integer number) { switch (sign) { case "<": anAssert.isLessThan(number); break; case "<=": anAssert.isLessThanOrEqualTo(number); break; case "!=": case "<>": anAssert.isNotEqualTo(number); break; case ">=": anAssert.isGreaterThanOrEqualTo(number); break; case ">": anAssert.isGreaterThan(number); break; case "=": anAssert.isEqualTo(number); break; } }
Example #2
Source File: ValueAssert.java From xmlunit with Apache License 2.0 | 5 votes |
/** * Returns an {@code Assert} object that allows performing assertions on integer value of the {@link String} under test. * * @throws AssertionError if the actual value is {@code null}. * @throws AssertionError if the actual value does not contain a parsable integer */ public AbstractIntegerAssert<?> asInt() { isNotNull(); int value = 0; try { value = Integer.parseInt(actual); } catch (NumberFormatException e) { throwAssertionError(shouldBeConvertible(actual, "int")); } return AssertionsAdapter.assertThat(value); }
Example #3
Source File: JsonPathAssert.java From spring-cloud-open-service-broker with Apache License 2.0 | 4 votes |
public AbstractIntegerAssert<?> hasIntegerAtPath(String path) { return Assertions.assertThat(actual.read(path, Integer.class)); }
Example #4
Source File: AssertionsAdapter.java From xmlunit with Apache License 2.0 | 4 votes |
static AbstractIntegerAssert<?> assertThat(int actual) { return new IntegerAssert(actual); }