Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
KristianTashkov committed Sep 12, 2021
1 parent 804edfa commit 697fffb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import androidx.test.filters.MediumTest
import org.hamcrest.CoreMatchers.equalTo
import org.hamcrest.MatcherAssert.assertThat
import org.isoron.uhabits.BaseViewTest
import org.isoron.uhabits.core.models.NumericalHabitType
import org.isoron.uhabits.utils.PaletteUtils
import org.junit.Before
import org.junit.Test
Expand All @@ -42,7 +43,9 @@ class NumberButtonViewTest : BaseViewTest() {
super.setUp()
view = component.getNumberButtonViewFactory().create().apply {
units = "steps"
threshold = 100.0
targetType = NumericalHabitType.AT_LEAST
lowerThreshold = 0.0
higherThreshold = 100.0
color = PaletteUtils.getAndroidTestColor(8)
onEdit = { edited = true }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import androidx.test.filters.MediumTest
import org.hamcrest.CoreMatchers.equalTo
import org.hamcrest.MatcherAssert.assertThat
import org.isoron.uhabits.BaseViewTest
import org.isoron.uhabits.core.models.NumericalHabitType
import org.isoron.uhabits.core.models.Timestamp
import org.isoron.uhabits.utils.PaletteUtils
import org.junit.After
Expand Down Expand Up @@ -55,7 +56,9 @@ class NumberPanelViewTest : BaseViewTest() {
buttonCount = 4
color = PaletteUtils.getAndroidTestColor(7)
units = "steps"
threshold = 5000.0
targetType = NumericalHabitType.AT_LEAST
lowerThreshold = 0.0
higherThreshold = 5000.0
}
view.onAttachedToWindow()
measureView(view, dpToPixels(200), dpToPixels(200))
Expand Down

0 comments on commit 697fffb

Please sign in to comment.