From bbfe0bda76227d8b11fd6a7b91a3ebc003063dc4 Mon Sep 17 00:00:00 2001 From: Xavier Molloy Date: Fri, 22 Nov 2024 13:12:13 +0100 Subject: [PATCH] fix: [ANDROAPP-6644] resolve code smells --- .../java/org/dhis2/commons/date/DateUtilsTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/commons/src/androidTest/java/org/dhis2/commons/date/DateUtilsTest.java b/commons/src/androidTest/java/org/dhis2/commons/date/DateUtilsTest.java index 82c6169e12..1bcbb3c5dd 100644 --- a/commons/src/androidTest/java/org/dhis2/commons/date/DateUtilsTest.java +++ b/commons/src/androidTest/java/org/dhis2/commons/date/DateUtilsTest.java @@ -1,6 +1,6 @@ package org.dhis2.commons.date; -import static org.junit.Assert.assertEquals; +import org.junit.jupiter.api.Assertions; import org.junit.Test; import java.util.Calendar; import java.util.Date; @@ -14,13 +14,13 @@ public void returnsEventOverDueDateCorrectly() { Calendar calendar = Calendar.getInstance(); //should return false for current date calendar.setTime(new Date()); - assertEquals(false, DateUtils.getInstance().isEventDueDateOverdue(calendar.getTime())); + Assertions.assertFalse(DateUtils.getInstance().isEventDueDateOverdue(calendar.getTime())); //false for future date calendar.add(Calendar.DAY_OF_MONTH, 10); - assertEquals(false, DateUtils.getInstance().isEventDueDateOverdue(calendar.getTime())); + Assertions.assertFalse(DateUtils.getInstance().isEventDueDateOverdue(calendar.getTime())); //true for past dates calendar.add(Calendar.DAY_OF_MONTH, -30); - assertEquals(true, DateUtils.getInstance().isEventDueDateOverdue(calendar.getTime())); + Assertions.assertTrue(DateUtils.getInstance().isEventDueDateOverdue(calendar.getTime())); } }