Add miising test

This commit is contained in:
Gary Gregory 2024-03-15 23:59:31 -04:00
parent bae2887de4
commit 91b17ffaae
1 changed files with 11 additions and 0 deletions

View File

@ -24,6 +24,7 @@ import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertNotSame;
import static org.junit.jupiter.api.Assertions.assertSame;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
import org.apache.commons.lang3.AbstractLangTest;
import org.apache.commons.lang3.ArrayUtils;
@ -216,6 +217,16 @@ public class DiffBuilderTest extends AbstractLangTest {
assertEquals("prop1.int", list.getDiffs().get(0).getFieldName());
}
@Test
public void testDiffResultEquals() {
final TypeTestClass class1 = new TypeTestClass();
class1.intField = 2;
final DiffResult<TypeTestClass> list = new DiffBuilder<>(class1, class1, SHORT_STYLE).append("prop1", class1.diff(class1)).build();
assertEquals(0, list.getNumberOfDiffs());
assertTrue(list.getDiffs().isEmpty());
}
@Test
public void testDouble() {
final TypeTestClass class1 = new TypeTestClass();