From f5ad01f2fe56e2c3e73c58cf3866712c7941cfca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Rebelo?= Date: Sat, 28 Sep 2024 13:20:07 +0100 Subject: [PATCH] Update mockito to 5.14.0, fix tests --- app/build.gradle | 2 +- .../gadgetbridge/test/CalendarEventTest.java | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 73356698a..57df1b1d2 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -207,7 +207,7 @@ dependencies { implementation 'androidx.camera:camera-lifecycle:1.3.4' 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.hamcrest:hamcrest-library:3.0" diff --git a/app/src/test/java/nodomain/freeyourgadget/gadgetbridge/test/CalendarEventTest.java b/app/src/test/java/nodomain/freeyourgadget/gadgetbridge/test/CalendarEventTest.java index 80a6aa28c..f0d258c57 100644 --- a/app/src/test/java/nodomain/freeyourgadget/gadgetbridge/test/CalendarEventTest.java +++ b/app/src/test/java/nodomain/freeyourgadget/gadgetbridge/test/CalendarEventTest.java @@ -25,13 +25,13 @@ public class CalendarEventTest extends TestBase { @Test public void testHashCode() { 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 = - 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 = - 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 = - 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()); assertNotEquals(c1.hashCode(), c2.hashCode()); @@ -43,7 +43,7 @@ public class CalendarEventTest extends TestBase { @Test public void testSync() { List 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"); dummyGBDevice.setState(GBDevice.State.INITIALIZED); @@ -52,7 +52,7 @@ public class CalendarEventTest extends TestBase { 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); CalendarSyncStateDao calendarSyncStateDao = daoSession.getCalendarSyncStateDao();