Migrate junit.framework.Assert.assertEquals to kotlin.test.assertEquals

pull/1769/head
Quentin Hibon 2 years ago
parent 6b793c7c16
commit 5e490d88ee

@ -18,7 +18,6 @@
*/ */
package org.isoron.uhabits.core.commands package org.isoron.uhabits.core.commands
import junit.framework.Assert.assertEquals
import org.isoron.uhabits.core.BaseUnitTest import org.isoron.uhabits.core.BaseUnitTest
import org.isoron.uhabits.core.models.Entry import org.isoron.uhabits.core.models.Entry
import org.isoron.uhabits.core.models.Habit import org.isoron.uhabits.core.models.Habit
@ -26,6 +25,7 @@ import org.isoron.uhabits.core.models.Timestamp
import org.isoron.uhabits.core.utils.DateUtils.Companion.getToday import org.isoron.uhabits.core.utils.DateUtils.Companion.getToday
import org.junit.Before import org.junit.Before
import org.junit.Test import org.junit.Test
import kotlin.test.assertEquals
class CreateRepetitionCommandTest : BaseUnitTest() { class CreateRepetitionCommandTest : BaseUnitTest() {
private lateinit var command: CreateRepetitionCommand private lateinit var command: CreateRepetitionCommand

@ -18,7 +18,6 @@
*/ */
package org.isoron.uhabits.core.models package org.isoron.uhabits.core.models
import junit.framework.Assert.assertEquals
import junit.framework.Assert.assertFalse import junit.framework.Assert.assertFalse
import junit.framework.Assert.assertNull import junit.framework.Assert.assertNull
import org.hamcrest.CoreMatchers.equalTo import org.hamcrest.CoreMatchers.equalTo
@ -31,6 +30,7 @@ import org.junit.rules.ExpectedException
import java.io.IOException import java.io.IOException
import java.io.StringWriter import java.io.StringWriter
import java.util.ArrayList import java.util.ArrayList
import kotlin.test.assertEquals
class HabitListTest : BaseUnitTest() { class HabitListTest : BaseUnitTest() {
@get:Rule @get:Rule

@ -19,7 +19,6 @@
package org.isoron.uhabits.core.models.sqlite package org.isoron.uhabits.core.models.sqlite
import junit.framework.Assert.assertEquals
import junit.framework.Assert.assertNull import junit.framework.Assert.assertNull
import org.isoron.uhabits.core.BaseUnitTest.Companion.buildMemoryDatabase import org.isoron.uhabits.core.BaseUnitTest.Companion.buildMemoryDatabase
import org.isoron.uhabits.core.database.Repository import org.isoron.uhabits.core.database.Repository
@ -30,6 +29,7 @@ import org.isoron.uhabits.core.models.sqlite.records.EntryRecord
import org.isoron.uhabits.core.utils.DateUtils import org.isoron.uhabits.core.utils.DateUtils
import org.junit.Before import org.junit.Before
import org.junit.Test import org.junit.Test
import kotlin.test.assertEquals
class SQLiteEntryListTest { class SQLiteEntryListTest {

@ -18,7 +18,6 @@
*/ */
package org.isoron.uhabits.core.preferences package org.isoron.uhabits.core.preferences
import junit.framework.Assert.assertEquals
import junit.framework.Assert.assertFalse import junit.framework.Assert.assertFalse
import junit.framework.Assert.assertTrue import junit.framework.Assert.assertTrue
import org.hamcrest.CoreMatchers.equalTo import org.hamcrest.CoreMatchers.equalTo
@ -28,6 +27,7 @@ import org.junit.Before
import org.junit.Test import org.junit.Test
import java.io.File import java.io.File
import java.util.Arrays import java.util.Arrays
import kotlin.test.assertEquals
class PropertiesStorageTest : BaseUnitTest() { class PropertiesStorageTest : BaseUnitTest() {
private lateinit var storage: PropertiesStorage private lateinit var storage: PropertiesStorage

@ -18,7 +18,6 @@
*/ */
package org.isoron.uhabits.core.utils package org.isoron.uhabits.core.utils
import junit.framework.Assert.assertEquals
import org.hamcrest.MatcherAssert.assertThat import org.hamcrest.MatcherAssert.assertThat
import org.hamcrest.core.IsEqual.equalTo import org.hamcrest.core.IsEqual.equalTo
import org.isoron.uhabits.core.BaseUnitTest import org.isoron.uhabits.core.BaseUnitTest
@ -40,6 +39,7 @@ import java.util.Calendar
import java.util.GregorianCalendar import java.util.GregorianCalendar
import java.util.Locale import java.util.Locale
import java.util.TimeZone import java.util.TimeZone
import kotlin.test.assertEquals
class DateUtilsTest : BaseUnitTest() { class DateUtilsTest : BaseUnitTest() {
var firstWeekday = Calendar.SUNDAY var firstWeekday = Calendar.SUNDAY

Loading…
Cancel
Save