
de.larssh.utils.test.AssertEqualsAndHashCodeArguments Maven / Gradle / Ivy
// Generated by delombok at Sat Apr 03 10:50:09 UTC 2021
package de.larssh.utils.test;
import static java.util.Collections.unmodifiableList;
import java.util.ArrayList;
import java.util.List;
import edu.umd.cs.findbugs.annotations.Nullable;
/**
* Value object containing arguments in an original and a changed form, to be
* used for asserting the methods {@link Object#equals(Object)} and
* {@link Object#hashCode()}.
*
*
* The following example is made for a class called {@code Person}. That class
* contains three fields (see below) and a constructor accordingly.
*
* - Personal ID (used for equality)
*
- First name (not used for equality)
*
- Last name (not used for equality)
*
*
*
* assertEqualsAndHashCode(a -> new Person((int) a[0], (String) a[0], (String) a[0]),
* new AssertEqualsAndHashCodeArguments()
* .add(123, 456, true)
* .add('John', 'Jane', false)
* .add('Doe', 'Smith', false));
*
*/
public class AssertEqualsAndHashCodeArguments {
/**
* List of original arguments
*/
private final List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy