Skip to content

Commit

Permalink
Merge pull request #1648 from SimonMarquis/fix/1647
Browse files Browse the repository at this point in the history
Initialize DataStore with `TestScope.backgroundScope` in unit tests
  • Loading branch information
dturner authored Oct 2, 2024
2 parents dd516a7 + 96f850f commit beb091d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/prodRelease-badging.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ application-icon-640:'res/mipmap-anydpi-v26/ic_launcher.xml'
application-icon-65534:'res/mipmap-anydpi-v26/ic_launcher.xml'
application: label='Now in Android' icon='res/mipmap-anydpi-v26/ic_launcher.xml'
launchable-activity: name='com.google.samples.apps.nowinandroid.MainActivity' label='' icon=''
uses-library-not-required:'android.ext.adservices'
uses-library-not-required:'androidx.window.extensions'
uses-library-not-required:'androidx.window.sidecar'
uses-library-not-required:'android.ext.adservices'
feature-group: label=''
uses-feature: name='android.hardware.faketouch'
uses-implied-feature: name='android.hardware.faketouch' reason='default feature for all apps'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class OfflineFirstNewsRepositoryTest {
@Before
fun setup() {
niaPreferencesDataSource = NiaPreferencesDataSource(
tmpFolder.testUserPreferencesDataStore(testScope),
tmpFolder.testUserPreferencesDataStore(testScope.backgroundScope),
)
newsResourceDao = TestNewsResourceDao()
topicDao = TestTopicDao()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class OfflineFirstTopicsRepositoryTest {
topicDao = TestTopicDao()
network = TestNiaNetworkDataSource()
niaPreferences = NiaPreferencesDataSource(
tmpFolder.testUserPreferencesDataStore(testScope),
tmpFolder.testUserPreferencesDataStore(testScope.backgroundScope),
)
synchronizer = TestSynchronizer(niaPreferences)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class OfflineFirstUserDataRepositoryTest {
@Before
fun setup() {
niaPreferencesDataSource = NiaPreferencesDataSource(
tmpFolder.testUserPreferencesDataStore(testScope),
tmpFolder.testUserPreferencesDataStore(testScope.backgroundScope),
)

subject = OfflineFirstUserDataRepository(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class NiaPreferencesDataSourceTest {
@Before
fun setup() {
subject = NiaPreferencesDataSource(
tmpFolder.testUserPreferencesDataStore(testScope),
tmpFolder.testUserPreferencesDataStore(testScope.backgroundScope),
)
}

Expand Down

0 comments on commit beb091d

Please sign in to comment.