public class HashcodeEqualsTest
extends org.junit.Assert
hashCode and equals
method of a class.| Constructor and Description |
|---|
HashcodeEqualsTest() |
| Modifier and Type | Method and Description |
|---|---|
static <T> void |
test_with_to_string(T x,
T y1,
T y2)
Tests the same as
test(Object, Object, Object) but also tests
the toString method. |
static <T> void |
test(T x,
T y1,
T y2)
Makes a test.
|
assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertThat, assertThat, assertTrue, assertTrue, fail, failpublic static <T> void test(T x,
T y1,
T y2)
T - the class to testx - an instance of the classy1 - an instance of the class that is not equal to xy2 - an instance of the class that is not equal to x
but is equal to y1public static <T> void test_with_to_string(T x,
T y1,
T y2)
test(Object, Object, Object) but also tests
the toString method. Assumes the toString
method returns equal values for equal objects and different values
for different objects.T - the class to testx - an instance of the classy1 - an instance of the class that is not equal to xy2 - an instance of the class that is not equal to x
but is equal to y1Copyright © 2015. All rights reserved.