@@ -13,7 +13,6 @@ import org.mockito.kotlin.any
1313import org.mockito.kotlin.anyOrNull
1414import org.mockito.kotlin.mock
1515import org.mockito.kotlin.whenever
16- import org.mockito.kotlin.wheneverBlocking
1716import to.bitkit.data.AppCacheData
1817import to.bitkit.data.CacheStore
1918import to.bitkit.data.SettingsData
@@ -93,17 +92,17 @@ class AppViewModelSendFlowTest : BaseUnitTest() {
9392 whenever(transferRepo.activeTransfers).thenReturn(flowOf(emptyList()))
9493 whenever(timedSheetManager.currentSheet).thenReturn(MutableStateFlow (null ))
9594 whenever(migrationService.isShowingMigrationLoading).thenReturn(MutableStateFlow (false ))
96- wheneverBlocking { migrationService.needsPostMigrationSync() }.thenReturn(false )
97- wheneverBlocking { migrationService.isMigrationChecked() }.thenReturn(true )
98- wheneverBlocking { widgetsRepo.refreshEnabledWidgets() }.thenReturn(Unit )
99- wheneverBlocking { lightningRepo.updateGeoBlockState() }.thenReturn(Unit )
100- wheneverBlocking { currencyRepo.convertSatsToFiat(any(), anyOrNull()) }
95+ whenever { migrationService.needsPostMigrationSync() }.thenReturn(false )
96+ whenever { migrationService.isMigrationChecked() }.thenReturn(true )
97+ whenever { widgetsRepo.refreshEnabledWidgets() }.thenReturn(Unit )
98+ whenever { lightningRepo.updateGeoBlockState() }.thenReturn(Unit )
99+ whenever { currencyRepo.convertSatsToFiat(any(), anyOrNull()) }
101100 .thenReturn(Result .failure(Exception (" not mocked" )))
102- wheneverBlocking { lightningRepo.calculateTotalFee(any(), anyOrNull(), any(), anyOrNull(), anyOrNull()) }
101+ whenever { lightningRepo.calculateTotalFee(any(), anyOrNull(), any(), anyOrNull(), anyOrNull()) }
103102 .thenReturn(Result .success(100uL ))
104- wheneverBlocking { lightningRepo.getFeeRateForSpeed(any(), anyOrNull()) }
103+ whenever { lightningRepo.getFeeRateForSpeed(any(), anyOrNull()) }
105104 .thenReturn(Result .success(2u ))
106- wheneverBlocking { lightningRepo.canSend(any(), any()) }.thenReturn(true )
105+ whenever { lightningRepo.canSend(any(), any()) }.thenReturn(true )
107106
108107 sut = AppViewModel (
109108 connectivityRepo = connectivityRepo,
0 commit comments