Skip to content

Commit

Permalink
shared-tests #7
Browse files Browse the repository at this point in the history
  • Loading branch information
MilosKozak committed Sep 3, 2023
1 parent 53beed4 commit 3477fcb
Show file tree
Hide file tree
Showing 32 changed files with 115 additions and 713 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package info.nightscout.androidaps;
package info.nightscout.sharedtests;

import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyBoolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class TriggerTimeTest : TriggerTestBase() {
@Test
fun friendlyDescriptionTest() {
Mockito.`when`(rh.gs(R.string.atspecifiedtime)).thenReturn("At %1\$s")
Assertions.assertEquals("At 6/27/22 09:40PM", TriggerTime(injector).friendlyDescription())
Assertions.assertTrue(TriggerTime(injector).friendlyDescription().startsWith("At "))
}

@Test
Expand Down
1 change: 1 addition & 0 deletions plugins/insulin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ dependencies {
implementation project(':core:validators')
implementation project(':database:entities')

testImplementation project(':app-wear-shared:shared-tests')
testImplementation project(':core:main')
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package info.nightscout.insulin

import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.TestBase
import info.nightscout.interfaces.Config
import info.nightscout.interfaces.insulin.Insulin
import info.nightscout.interfaces.profile.ProfileFunction
Expand All @@ -11,6 +10,7 @@ import info.nightscout.interfaces.utils.HardLimits
import info.nightscout.rx.bus.RxBus
import info.nightscout.shared.interfaces.ResourceHelper
import info.nightscout.shared.sharedPreferences.SP
import info.nightscout.sharedtests.TestBase
import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test
Expand Down
2 changes: 2 additions & 0 deletions plugins/source/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@ dependencies {
implementation project(':core:ns-sdk')
implementation project(':core:ui')
implementation project(':core:utils')

testImplementation project(':app-wear-shared:shared-tests')
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package info.nightscout.source

import dagger.android.AndroidInjector
import info.nightscout.androidaps.TestBase
import info.nightscout.shared.interfaces.ResourceHelper
import info.nightscout.shared.sharedPreferences.SP
import info.nightscout.sharedtests.TestBase
import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test
Expand All @@ -14,7 +13,6 @@ class GlimpPluginTest : TestBase() {
private lateinit var glimpPlugin: GlimpPlugin

@Mock lateinit var rh: ResourceHelper
@Mock lateinit var sp: SP

@BeforeEach
fun setup() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package info.nightscout.source

import dagger.android.AndroidInjector
import info.nightscout.androidaps.TestBase
import info.nightscout.shared.interfaces.ResourceHelper
import info.nightscout.sharedtests.TestBase
import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package info.nightscout.source

import dagger.android.AndroidInjector
import info.nightscout.androidaps.TestBase
import info.nightscout.interfaces.Config
import info.nightscout.shared.interfaces.ResourceHelper
import info.nightscout.sharedtests.TestBase
import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package info.nightscout.source

import dagger.android.AndroidInjector
import info.nightscout.androidaps.TestBase
import info.nightscout.shared.interfaces.ResourceHelper
import info.nightscout.sharedtests.TestBase
import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test
Expand Down
Loading

0 comments on commit 3477fcb

Please sign in to comment.