mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-27 11:05:49 +01:00
Some basics for testing the calendar functionality
This commit is contained in:
parent
d570d188a2
commit
523055189f
@ -93,7 +93,7 @@ public class CalendarEvents {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class CalendarEvent {
|
public static class CalendarEvent {
|
||||||
private long begin;
|
private long begin;
|
||||||
private long end;
|
private long end;
|
||||||
private long id;
|
private long id;
|
||||||
|
@ -0,0 +1,23 @@
|
|||||||
|
package nodomain.freeyourgadget.gadgetbridge.test;
|
||||||
|
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import nodomain.freeyourgadget.gadgetbridge.model.CalendarEvents;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertNotEquals;
|
||||||
|
|
||||||
|
public class CalendarEventTest extends TestBase {
|
||||||
|
private static final long BEGIN = 1;
|
||||||
|
private static final long END = 2;
|
||||||
|
private static final long ID_1 = 100;
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testHashCode() {
|
||||||
|
CalendarEvents.CalendarEvent c1 = new CalendarEvents.CalendarEvent(BEGIN, END, ID_1, "something", null, null, null, false);
|
||||||
|
CalendarEvents.CalendarEvent c2 = new CalendarEvents.CalendarEvent(BEGIN, END, ID_1, "something", null, null, null, false);
|
||||||
|
CalendarEvents.CalendarEvent c3 = new CalendarEvents.CalendarEvent(BEGIN, END, ID_1, "something", null, null, null, false);
|
||||||
|
|
||||||
|
assertNotEquals(c1.hashCode(), c2.hashCode());
|
||||||
|
assertNotEquals(c2.hashCode(), c3.hashCode());
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user