use of org.opengrok.web.api.v1.controller.HistoryController.HistoryEntryDTO in project OpenGrok by OpenGrok.
the class HistoryControllerTest method testHistoryDTOEquals.
@Test
public void testHistoryDTOEquals() {
HistoryEntry historyEntry = new HistoryEntry("1", new Date(1245446973L / 60 * 60 * 1000), "xyz", "foo", true);
HistoryEntryDTO entry1 = new HistoryEntryDTO(historyEntry);
historyEntry.setAuthor("abc");
HistoryEntryDTO entry2 = new HistoryEntryDTO(historyEntry);
assertEquals(entry1, entry1);
assertNotEquals(entry1, entry2);
HistoryDTO history1 = new HistoryDTO(Collections.singletonList(entry1), 0, 1, 1);
HistoryDTO history2 = new HistoryDTO(Collections.singletonList(entry2), 0, 1, 1);
assertEquals(history1, history1);
assertNotEquals(history1, history2);
}
Aggregations