/** * Verifies that the actual number is not close to the given one within the given percentage.<br> * If difference is equal to the percentage value, the assertion fails. * <p> * Example with short: * <pre><code class='java'> // assertion will pass: * assertThat((short) 11).isNotCloseTo((short) 10, withinPercentage((short) 5)); * * // assertions will fail * assertThat((short) 11).isNotCloseTo((short) 10, withinPercentage((short) 10)); * assertThat((short) 11).isNotCloseTo((short) 10, withinPercentage((short) 20));</code></pre> * * @param expected the given number to compare the actual value to. * @param percentage the given positive percentage. * @return {@code this} assertion object. * @throws NullPointerException if the given offset is {@code null}. * @throws NullPointerException if the expected number is {@code null}. * @throws AssertionError if the actual value is close to the given one. * @since 2.6.0 / 3.6.0 */ public SELF isNotCloseTo(short expected, Percentage percentage) { shorts.assertIsNotCloseToPercentage(info, actual, expected, percentage); return myself; }
/** * Verifies that the actual number is not close to the given one within the given percentage.<br> * If difference is equal to the percentage value, the assertion fails. * <p> * Example with short: * <pre><code class='java'> // assertion will pass: * assertThat((short) 11).isNotCloseTo(Short.valueOf(10), withinPercentage((short) 5)); * * // assertions will fail * assertThat((short) 11).isNotCloseTo(Short.valueOf(10), withinPercentage((short) 10)); * assertThat((short) 11).isNotCloseTo(Short.valueOf(10), withinPercentage((short) 20));</code></pre> * * @param expected the given number to compare the actual value to. * @param percentage the given positive percentage. * @return {@code this} assertion object. * @throws NullPointerException if the given offset is {@code null}. * @throws NullPointerException if the expected number is {@code null}. * @throws AssertionError if the actual value is close to the given one. * @since 2.6.0 / 3.6.0 */ @Override public SELF isNotCloseTo(Short expected, Percentage percentage) { shorts.assertIsNotCloseToPercentage(info, actual, expected, percentage); return myself; }
/** * Verifies that the actual number is not close to the given one within the given percentage.<br> * If difference is equal to the percentage value, the assertion fails. * <p> * Example with short: * <pre><code class='java'> // assertion will pass: * assertThat((short) 11).isNotCloseTo((short) 10, withinPercentage((short) 5)); * * // assertions will fail * assertThat((short) 11).isNotCloseTo((short) 10, withinPercentage((short) 10)); * assertThat((short) 11).isNotCloseTo((short) 10, withinPercentage((short) 20));</code></pre> * * @param expected the given number to compare the actual value to. * @param percentage the given positive percentage. * @return {@code this} assertion object. * @throws NullPointerException if the given offset is {@code null}. * @throws NullPointerException if the expected number is {@code null}. * @throws AssertionError if the actual value is close to the given one. * @since 2.6.0 / 3.6.0 */ public SELF isNotCloseTo(short expected, Percentage percentage) { shorts.assertIsNotCloseToPercentage(info, actual, expected, percentage); return myself; }
/** * Verifies that the actual number is not close to the given one within the given percentage.<br> * If difference is equal to the percentage value, the assertion fails. * <p> * Example with short: * <pre><code class='java'> // assertion will pass: * assertThat((short) 11).isNotCloseTo(Short.valueOf(10), withinPercentage((short) 5)); * * // assertions will fail * assertThat((short) 11).isNotCloseTo(Short.valueOf(10), withinPercentage((short) 10)); * assertThat((short) 11).isNotCloseTo(Short.valueOf(10), withinPercentage((short) 20));</code></pre> * * @param expected the given number to compare the actual value to. * @param percentage the given positive percentage. * @return {@code this} assertion object. * @throws NullPointerException if the given offset is {@code null}. * @throws NullPointerException if the expected number is {@code null}. * @throws AssertionError if the actual value is close to the given one. * @since 2.6.0 / 3.6.0 */ @Override public SELF isNotCloseTo(Short expected, Percentage percentage) { shorts.assertIsNotCloseToPercentage(info, actual, expected, percentage); return myself; }