/** * Verifies that the actual number is not close to the given one b the given percentage.<br> * If difference is equal to the percentage value, the assertion fails. * <p> * Example with byte: * <pre><code class='java'> // assertion will pass: * assertThat((byte) 11).isNotCloseTo(Byte.valueOf(10), withinPercentage((byte) 5)); * * // assertions will fail * assertThat((byte) 11).isNotCloseTo(Byte.valueOf(10), withinPercentage((byte) 10)); * assertThat((byte) 11).isNotCloseTo(Byte.valueOf(10), withinPercentage((byte) 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(Byte expected, Percentage percentage) { bytes.assertIsNotCloseToPercentage(info, actual, expected, percentage); return myself; }
/** * Verifies that the actual number is not close to the given one by the given percentage.<br> * If difference is equal to the percentage value, the assertion fails. * <p> * Example with byte: * <pre><code class='java'> // assertion will pass: * assertThat((byte) 11).isNotCloseTo((byte) 10, withinPercentage((byte) 5)); * * // assertions will fail * assertThat((byte) 11).isNotCloseTo((byte) 10, withinPercentage((byte) 10)); * assertThat((byte) 11).isNotCloseTo((byte) 10, withinPercentage((byte) 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(byte expected, Percentage percentage) { bytes.assertIsNotCloseToPercentage(info, actual, expected, percentage); return myself; }
/** * Verifies that the actual number is not close to the given one by the given percentage.<br> * If difference is equal to the percentage value, the assertion fails. * <p> * Example with byte: * <pre><code class='java'> // assertion will pass: * assertThat((byte) 11).isNotCloseTo((byte) 10, withinPercentage((byte) 5)); * * // assertions will fail * assertThat((byte) 11).isNotCloseTo((byte) 10, withinPercentage((byte) 10)); * assertThat((byte) 11).isNotCloseTo((byte) 10, withinPercentage((byte) 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(byte expected, Percentage percentage) { bytes.assertIsNotCloseToPercentage(info, actual, expected, percentage); return myself; }
/** * Verifies that the actual number is not close to the given one b the given percentage.<br> * If difference is equal to the percentage value, the assertion fails. * <p> * Example with byte: * <pre><code class='java'> // assertion will pass: * assertThat((byte) 11).isNotCloseTo(Byte.valueOf(10), withinPercentage((byte) 5)); * * // assertions will fail * assertThat((byte) 11).isNotCloseTo(Byte.valueOf(10), withinPercentage((byte) 10)); * assertThat((byte) 11).isNotCloseTo(Byte.valueOf(10), withinPercentage((byte) 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(Byte expected, Percentage percentage) { bytes.assertIsNotCloseToPercentage(info, actual, expected, percentage); return myself; }