mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-24 10:56:50 +01:00
Update mockito to 5.14.0, fix tests
This commit is contained in:
parent
e65d847835
commit
f5ad01f2fe
@ -207,7 +207,7 @@ dependencies {
|
|||||||
implementation 'androidx.camera:camera-lifecycle:1.3.4'
|
implementation 'androidx.camera:camera-lifecycle:1.3.4'
|
||||||
|
|
||||||
testImplementation "junit:junit:4.13.2"
|
testImplementation "junit:junit:4.13.2"
|
||||||
testImplementation "org.mockito:mockito-core:5.13.0"
|
testImplementation "org.mockito:mockito-core:5.14.0"
|
||||||
testImplementation "org.robolectric:robolectric:4.13"
|
testImplementation "org.robolectric:robolectric:4.13"
|
||||||
testImplementation "org.hamcrest:hamcrest-library:3.0"
|
testImplementation "org.hamcrest:hamcrest-library:3.0"
|
||||||
|
|
||||||
|
@ -25,13 +25,13 @@ public class CalendarEventTest extends TestBase {
|
|||||||
@Test
|
@Test
|
||||||
public void testHashCode() {
|
public void testHashCode() {
|
||||||
CalendarEvent c1 =
|
CalendarEvent c1 =
|
||||||
new CalendarEvent(BEGIN, END, ID_1, "something", null, null, CALNAME_1, CALACCOUNTNAME_1, COLOR_1, false, null);
|
new CalendarEvent(BEGIN, END, ID_1, "something", null, null, CALNAME_1, CALACCOUNTNAME_1, COLOR_1, false, null, null, null, null);
|
||||||
CalendarEvent c2 =
|
CalendarEvent c2 =
|
||||||
new CalendarEvent(BEGIN, END, ID_1, null, "something", null, CALNAME_1, CALACCOUNTNAME_1, COLOR_1, false, null);
|
new CalendarEvent(BEGIN, END, ID_1, null, "something", null, CALNAME_1, CALACCOUNTNAME_1, COLOR_1, false, null, null, null, null);
|
||||||
CalendarEvent c3 =
|
CalendarEvent c3 =
|
||||||
new CalendarEvent(BEGIN, END, ID_1, null, null, "something", CALNAME_1, CALACCOUNTNAME_1, COLOR_1, false, null);
|
new CalendarEvent(BEGIN, END, ID_1, null, null, "something", CALNAME_1, CALACCOUNTNAME_1, COLOR_1, false, null, null, null, null);
|
||||||
CalendarEvent c4 =
|
CalendarEvent c4 =
|
||||||
new CalendarEvent(BEGIN, END, ID_1, null, null, "something", CALNAME_1, CALACCOUNTNAME_1, COLOR_1, false, "some");
|
new CalendarEvent(BEGIN, END, ID_1, null, null, "something", CALNAME_1, CALACCOUNTNAME_1, COLOR_1, false, "some", null, null, null);
|
||||||
|
|
||||||
assertEquals(c1.hashCode(), c1.hashCode());
|
assertEquals(c1.hashCode(), c1.hashCode());
|
||||||
assertNotEquals(c1.hashCode(), c2.hashCode());
|
assertNotEquals(c1.hashCode(), c2.hashCode());
|
||||||
@ -43,7 +43,7 @@ public class CalendarEventTest extends TestBase {
|
|||||||
@Test
|
@Test
|
||||||
public void testSync() {
|
public void testSync() {
|
||||||
List<CalendarEvent> eventList = new ArrayList<>();
|
List<CalendarEvent> eventList = new ArrayList<>();
|
||||||
eventList.add(new CalendarEvent(BEGIN, END, ID_1, null, "something", null, CALNAME_1, CALACCOUNTNAME_1, COLOR_1, false, null));
|
eventList.add(new CalendarEvent(BEGIN, END, ID_1, null, "something", null, CALNAME_1, CALACCOUNTNAME_1, COLOR_1, false, null, null, null, null));
|
||||||
|
|
||||||
GBDevice dummyGBDevice = createDummyGDevice("00:00:01:00:03");
|
GBDevice dummyGBDevice = createDummyGDevice("00:00:01:00:03");
|
||||||
dummyGBDevice.setState(GBDevice.State.INITIALIZED);
|
dummyGBDevice.setState(GBDevice.State.INITIALIZED);
|
||||||
@ -52,7 +52,7 @@ public class CalendarEventTest extends TestBase {
|
|||||||
|
|
||||||
testCR.syncCalendar(eventList);
|
testCR.syncCalendar(eventList);
|
||||||
|
|
||||||
eventList.add(new CalendarEvent(BEGIN, END, ID_2, null, "something", null, CALNAME_1, CALACCOUNTNAME_1, COLOR_1, false, null));
|
eventList.add(new CalendarEvent(BEGIN, END, ID_2, null, "something", null, CALNAME_1, CALACCOUNTNAME_1, COLOR_1, false, null, null, null, null));
|
||||||
testCR.syncCalendar(eventList);
|
testCR.syncCalendar(eventList);
|
||||||
|
|
||||||
CalendarSyncStateDao calendarSyncStateDao = daoSession.getCalendarSyncStateDao();
|
CalendarSyncStateDao calendarSyncStateDao = daoSession.getCalendarSyncStateDao();
|
||||||
|
Loading…
Reference in New Issue
Block a user