Skip to content

Commit d5dc7f6

Browse files
author
Vladimir Kotal
committed
add initial HistoryEntry.equals() test
1 parent bf072ca commit d5dc7f6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

opengrok-indexer/src/test/java/org/opengrok/indexer/history/HistoryEntryTest.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232

3333
import static org.junit.jupiter.api.Assertions.assertEquals;
3434
import static org.junit.jupiter.api.Assertions.assertFalse;
35+
import static org.junit.jupiter.api.Assertions.assertNotSame;
3536
import static org.junit.jupiter.api.Assertions.assertNull;
3637
import static org.junit.jupiter.api.Assertions.assertTrue;
3738

@@ -246,4 +247,11 @@ public void strip() {
246247
assertNull(instance.getTags());
247248
}
248249

250+
@Test
251+
public void testEquals() {
252+
// TODO: add tests with nulls
253+
HistoryEntry e = new HistoryEntry(instance);
254+
assertNotSame(e, instance);
255+
assertEquals(e, instance);
256+
}
249257
}

0 commit comments

Comments
 (0)