/** * Verifies that the actual array does not contain duplicates. * <p> * If you want to set a precision for the comparison either use {@link #doesNotHaveDuplicates(Offset)} * or {@link #usingComparatorWithPrecision(Double)} before calling the assertion. * <p> * Example: * <pre><code class='java'> // assertion will pass * assertThat(new double[] { 1.0, 2.0, 3.0 }).doesNotHaveDuplicates(); * assertThat(new double[] { 1.0, 1.1 }).usingComparatorWithPrecision(0.01) * .doesNotHaveDuplicates(); * * // assertion will fail * assertThat(new double[] { 1.0, 1.0, 2.0, 3.0 }).doesNotHaveDuplicates(); * assertThat(new double[] { 1.0, 1.1 }).usingComparatorWithPrecision(0.5) * .doesNotHaveDuplicates();</code></pre> * * @return {@code this} assertion object. * @throws AssertionError if the actual array is {@code null}. * @throws AssertionError if the actual array contains duplicates. */ public SELF doesNotHaveDuplicates() { arrays.assertDoesNotHaveDuplicates(info, actual); return myself; }
/** * Verifies that the actual array does not contain duplicates. * <p> * If you want to set a precision for the comparison either use {@link #doesNotHaveDuplicates(Offset)} * or {@link #usingComparatorWithPrecision(Double)} before calling the assertion. * <p> * Example: * <pre><code class='java'> // assertion will pass * assertThat(new double[] { 1.0, 2.0, 3.0 }).doesNotHaveDuplicates(); * assertThat(new double[] { 1.0, 1.1 }).usingComparatorWithPrecision(0.01) * .doesNotHaveDuplicates(); * * // assertion will fail * assertThat(new double[] { 1.0, 1.0, 2.0, 3.0 }).doesNotHaveDuplicates(); * assertThat(new double[] { 1.0, 1.1 }).usingComparatorWithPrecision(0.5) * .doesNotHaveDuplicates();</code></pre> * * @return {@code this} assertion object. * @throws AssertionError if the actual array is {@code null}. * @throws AssertionError if the actual array contains duplicates. */ public SELF doesNotHaveDuplicates() { arrays.assertDoesNotHaveDuplicates(info, actual); return myself; }
/** * Verifies that the actual array does not contain duplicates. * <p> * Example: * * <pre><code class='java'> * // assertion will pass * assertThat(new double[] { 1.0, 2.0, 3.0 }).doesNotHaveDuplicates(); * * // assertion will fail * assertThat(new double[] { 1.0, 1.0, 2.0, 3.0 }).doesNotHaveDuplicates(); * </code></pre> * * </p> * * @return {@code this} assertion object. * @throws AssertionError if the actual array is {@code null}. * @throws AssertionError if the actual array contains duplicates. */ public S doesNotHaveDuplicates() { arrays.assertDoesNotHaveDuplicates(info, actual); return myself; }