mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-07-11 23:06:00 +00:00
Fix lint errors
This commit is contained in:
parent
5c3475ed64
commit
41edd2ddbd
8 changed files with 15 additions and 22 deletions
|
|
@ -8,4 +8,4 @@ class BaseTestCase {
|
|||
fun initMocks() {
|
||||
MockKAnnotations.init(this, relaxed = true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,4 +10,4 @@ internal class TestRepositoryModule : RepositoryModule() {
|
|||
override fun providesRealm(): Realm {
|
||||
return mockk()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import org.junit.jupiter.api.Assertions.assertEquals
|
|||
import org.junit.jupiter.api.Test
|
||||
import java.util.Locale
|
||||
|
||||
|
||||
class HealthFormatterTest {
|
||||
@Test
|
||||
fun shouldRoundValuesGreaterThanOneDown() {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
package com.habitrpg.android.habitica.helpers
|
||||
|
||||
import android.content.Context
|
||||
import com.habitrpg.android.habitica.helpers.NumberAbbreviator.abbreviate
|
||||
import com.habitrpg.android.habitica.R
|
||||
import com.habitrpg.android.habitica.helpers.NumberAbbreviator.abbreviate
|
||||
import io.kotest.matchers.shouldBe
|
||||
import io.mockk.every
|
||||
import io.mockk.impl.annotations.MockK
|
||||
|
|
@ -50,4 +50,4 @@ class NumberAbbreviatorTest {
|
|||
fun voidtestThatitRoundsCorrectly() {
|
||||
abbreviate(context, 9999.0, 2) shouldBe "9.99k"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
package com.habitrpg.android.habitica.helpers
|
||||
|
||||
import com.habitrpg.android.habitica.models.inventory.Equipment
|
||||
import com.habitrpg.android.habitica.helpers.UserStatComputer.EquipmentRow
|
||||
import com.habitrpg.android.habitica.helpers.UserStatComputer.AttributeRow
|
||||
import com.habitrpg.android.habitica.R
|
||||
import com.habitrpg.android.habitica.helpers.UserStatComputer.AttributeRow
|
||||
import com.habitrpg.android.habitica.helpers.UserStatComputer.EquipmentRow
|
||||
import com.habitrpg.android.habitica.models.inventory.Equipment
|
||||
import com.habitrpg.android.habitica.models.members.Member
|
||||
import com.habitrpg.android.habitica.models.user.Stats
|
||||
import org.junit.jupiter.api.Assertions.assertEquals
|
||||
|
|
@ -93,4 +93,4 @@ class UserStatComputerTest {
|
|||
equipmentList = ArrayList()
|
||||
equipmentList.add(equipment)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,11 @@
|
|||
package com.habitrpg.android.habitica.models
|
||||
|
||||
import com.habitrpg.android.habitica.models.user.SubscriptionPlan
|
||||
import org.junit.Before
|
||||
import org.junit.jupiter.api.Assertions
|
||||
import org.junit.jupiter.api.BeforeEach
|
||||
import org.junit.jupiter.api.Test
|
||||
import java.lang.Exception
|
||||
import java.util.Calendar
|
||||
import java.util.Date
|
||||
import kotlin.Throws
|
||||
|
||||
class SubscriptionPlanTest {
|
||||
private var plan: SubscriptionPlan? = null
|
||||
|
|
@ -44,4 +41,4 @@ class SubscriptionPlanTest {
|
|||
plan!!.dateTerminated = calendar.time
|
||||
Assertions.assertFalse(plan!!.isActive)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,13 @@
|
|||
package com.habitrpg.android.habitica.models
|
||||
|
||||
import com.habitrpg.android.habitica.models.user.Items
|
||||
|
||||
import com.habitrpg.android.habitica.models.user.OwnedMount
|
||||
import com.habitrpg.android.habitica.models.user.OwnedPet
|
||||
import com.habitrpg.android.habitica.models.user.User
|
||||
import io.realm.RealmList
|
||||
import org.junit.jupiter.api.Assertions
|
||||
import org.junit.jupiter.api.BeforeEach
|
||||
import org.junit.jupiter.api.Test
|
||||
import io.realm.RealmList
|
||||
import com.habitrpg.android.habitica.models.user.OwnedPet
|
||||
import com.habitrpg.android.habitica.models.user.OwnedMount
|
||||
import com.habitrpg.android.habitica.models.user.User
|
||||
import org.junit.jupiter.api.Assertions
|
||||
|
||||
class UserTest {
|
||||
private var user: User? = null
|
||||
|
|
@ -56,4 +55,4 @@ class UserTest {
|
|||
get() {
|
||||
Assertions.assertEquals(0, user!!.mountsTamedCount)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,10 +6,8 @@ import com.habitrpg.android.habitica.extensions.getTranslatedType
|
|||
import io.kotest.matchers.shouldBe
|
||||
import io.mockk.every
|
||||
import io.mockk.impl.annotations.MockK
|
||||
import io.mockk.verify
|
||||
import org.junit.jupiter.api.Test
|
||||
|
||||
|
||||
private const val FAKE_STANDARD = "Standard"
|
||||
private const val FAKE_PREMIUM = "premium"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue