@@ -12,16 +12,16 @@ import org.mockito.kotlin.any
1212import org.mockito.kotlin.mock
1313import org.mockito.kotlin.verify
1414import org.mockito.kotlin.whenever
15- import to.bitkit.test.BaseUnitTest
1615import to.bitkit.data.SettingsData
1716import to.bitkit.data.SettingsStore
1817import to.bitkit.models.BalanceState
1918import to.bitkit.models.ConvertedAmount
20- import java.util.Locale
2119import to.bitkit.repositories.CurrencyRepo
2220import to.bitkit.repositories.WalletRepo
21+ import to.bitkit.test.BaseUnitTest
2322import to.bitkit.ui.components.TimedSheetType
2423import java.math.BigDecimal
24+ import java.util.Locale
2525
2626class HighBalanceTimedSheetTest : BaseUnitTest () {
2727 private lateinit var settingsStore: SettingsStore
@@ -64,15 +64,17 @@ class HighBalanceTimedSheetTest : BaseUnitTest() {
6464 MutableStateFlow (BalanceState (totalOnchainSats = 10000U ))
6565 )
6666 whenever(currencyRepo.convertSatsToFiat(10000L , " USD" )).thenReturn(
67- Result .success(ConvertedAmount (
68- value = BigDecimal (" 100" ),
69- formatted = " 100.00" ,
70- symbol = " $" ,
71- currency = " USD" ,
72- flag = " " ,
73- sats = 10000L ,
74- locale = Locale .US
75- ))
67+ Result .success(
68+ ConvertedAmount (
69+ value = BigDecimal (" 100" ),
70+ formatted = " 100.00" ,
71+ symbol = " $" ,
72+ currency = " USD" ,
73+ flag = " " ,
74+ sats = 10000L ,
75+ locale = Locale .US
76+ )
77+ )
7678 )
7779
7880 val result = sut.shouldShow()
@@ -100,15 +102,17 @@ class HighBalanceTimedSheetTest : BaseUnitTest() {
100102 MutableStateFlow (BalanceState (totalOnchainSats = 100000U ))
101103 )
102104 whenever(currencyRepo.convertSatsToFiat(100000L , " USD" )).thenReturn(
103- Result .success(ConvertedAmount (
104- value = BigDecimal (" 600" ),
105- formatted = " 600.00" ,
106- symbol = " $" ,
107- currency = " USD" ,
108- flag = " " ,
109- sats = 100000L ,
110- locale = Locale .US
111- ))
105+ Result .success(
106+ ConvertedAmount (
107+ value = BigDecimal (" 600" ),
108+ formatted = " 600.00" ,
109+ symbol = " $" ,
110+ currency = " USD" ,
111+ flag = " " ,
112+ sats = 100000L ,
113+ locale = Locale .US
114+ )
115+ )
112116 )
113117 settingsFlow.value = defaultSettings.copy(balanceWarningTimes = 3 )
114118
@@ -124,15 +128,17 @@ class HighBalanceTimedSheetTest : BaseUnitTest() {
124128 MutableStateFlow (BalanceState (totalOnchainSats = 100000U ))
125129 )
126130 whenever(currencyRepo.convertSatsToFiat(100000L , " USD" )).thenReturn(
127- Result .success(ConvertedAmount (
128- value = BigDecimal (" 600" ),
129- formatted = " 600.00" ,
130- symbol = " $" ,
131- currency = " USD" ,
132- flag = " " ,
133- sats = 100000L ,
134- locale = Locale .US
135- ))
131+ Result .success(
132+ ConvertedAmount (
133+ value = BigDecimal (" 600" ),
134+ formatted = " 600.00" ,
135+ symbol = " $" ,
136+ currency = " USD" ,
137+ flag = " " ,
138+ sats = 100000L ,
139+ locale = Locale .US
140+ )
141+ )
136142 )
137143 settingsFlow.value = defaultSettings.copy(
138144 balanceWarningTimes = 0 ,
@@ -151,15 +157,17 @@ class HighBalanceTimedSheetTest : BaseUnitTest() {
151157 MutableStateFlow (BalanceState (totalOnchainSats = 100000U ))
152158 )
153159 whenever(currencyRepo.convertSatsToFiat(100000L , " USD" )).thenReturn(
154- Result .success(ConvertedAmount (
155- value = BigDecimal (" 600" ),
156- formatted = " 600.00" ,
157- symbol = " $" ,
158- currency = " USD" ,
159- flag = " " ,
160- sats = 100000L ,
161- locale = Locale .US
162- ))
160+ Result .success(
161+ ConvertedAmount (
162+ value = BigDecimal (" 600" ),
163+ formatted = " 600.00" ,
164+ symbol = " $" ,
165+ currency = " USD" ,
166+ flag = " " ,
167+ sats = 100000L ,
168+ locale = Locale .US
169+ )
170+ )
163171 )
164172 settingsFlow.value = defaultSettings.copy(
165173 balanceWarningTimes = 0 ,
@@ -177,15 +185,17 @@ class HighBalanceTimedSheetTest : BaseUnitTest() {
177185 MutableStateFlow (BalanceState (totalOnchainSats = 100000U ))
178186 )
179187 whenever(currencyRepo.convertSatsToFiat(100000L , " USD" )).thenReturn(
180- Result .success(ConvertedAmount (
181- value = BigDecimal (" 600" ),
182- formatted = " 600.00" ,
183- symbol = " $" ,
184- currency = " USD" ,
185- flag = " " ,
186- sats = 100000L ,
187- locale = Locale .US
188- ))
188+ Result .success(
189+ ConvertedAmount (
190+ value = BigDecimal (" 600" ),
191+ formatted = " 600.00" ,
192+ symbol = " $" ,
193+ currency = " USD" ,
194+ flag = " " ,
195+ sats = 100000L ,
196+ locale = Locale .US
197+ )
198+ )
189199 )
190200 settingsFlow.value = defaultSettings.copy(
191201 balanceWarningTimes = 0 ,
@@ -203,15 +213,17 @@ class HighBalanceTimedSheetTest : BaseUnitTest() {
203213 MutableStateFlow (BalanceState (totalOnchainSats = 10000U ))
204214 )
205215 whenever(currencyRepo.convertSatsToFiat(10000L , " USD" )).thenReturn(
206- Result .success(ConvertedAmount (
207- value = BigDecimal (" 100" ),
208- formatted = " 100.00" ,
209- symbol = " $" ,
210- currency = " USD" ,
211- flag = " " ,
212- sats = 10000L ,
213- locale = Locale .US
214- ))
216+ Result .success(
217+ ConvertedAmount (
218+ value = BigDecimal (" 100" ),
219+ formatted = " 100.00" ,
220+ symbol = " $" ,
221+ currency = " USD" ,
222+ flag = " " ,
223+ sats = 10000L ,
224+ locale = Locale .US
225+ )
226+ )
215227 )
216228 settingsFlow.value = defaultSettings.copy(balanceWarningTimes = 2 )
217229
@@ -239,15 +251,17 @@ class HighBalanceTimedSheetTest : BaseUnitTest() {
239251 MutableStateFlow (BalanceState (totalOnchainSats = 100000U ))
240252 )
241253 whenever(currencyRepo.convertSatsToFiat(100000L , " USD" )).thenReturn(
242- Result .success(ConvertedAmount (
243- value = BigDecimal (" 600" ),
244- formatted = " 600.00" ,
245- symbol = " $" ,
246- currency = " USD" ,
247- flag = " " ,
248- sats = 100000L ,
249- locale = Locale .US
250- ))
254+ Result .success(
255+ ConvertedAmount (
256+ value = BigDecimal (" 600" ),
257+ formatted = " 600.00" ,
258+ symbol = " $" ,
259+ currency = " USD" ,
260+ flag = " " ,
261+ sats = 100000L ,
262+ locale = Locale .US
263+ )
264+ )
251265 )
252266
253267 settingsFlow.value = defaultSettings.copy(
0 commit comments