Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sal0max committed Jan 24, 2022
1 parent 29a9520 commit 2aab3f1
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package de.salomax.currencies.repository

import de.salomax.currencies.model.ApiProvider
import de.salomax.currencies.model.Currency
import de.salomax.currencies.model.ExchangeRates
import de.salomax.currencies.model.Timeline
Expand All @@ -15,12 +16,12 @@ class ExchangeRatesServiceTest {
fun testExchangerateHost() = runBlocking {
// latest
testWebservice(
ExchangeRatesService.getRates(ExchangeRatesService.ApiProvider.EXCHANGERATE_HOST).get(), 1
ExchangeRatesService.getRates(ApiProvider.EXCHANGERATE_HOST).get(), 1
)
// timeline
testTimeline(
ExchangeRatesService.getTimeline(
ExchangeRatesService.ApiProvider.EXCHANGERATE_HOST,
ApiProvider.EXCHANGERATE_HOST,
Currency.EUR, Currency.ISK
).get()
)
Expand All @@ -30,27 +31,27 @@ class ExchangeRatesServiceTest {
fun testFrankfurterApp() = runBlocking {
// latest
testWebservice(
ExchangeRatesService.getRates(ExchangeRatesService.ApiProvider.FRANKFURTER_APP).get(), 4
ExchangeRatesService.getRates(ApiProvider.FRANKFURTER_APP).get(), 4
)
// timeline
testTimeline(
ExchangeRatesService.getTimeline(
ExchangeRatesService.ApiProvider.FRANKFURTER_APP,
ApiProvider.FRANKFURTER_APP,
Currency.EUR, Currency.ISK
).get()
)
}

@Test
fun testFerEe() = runBlocking {
fun testFerEe() = runBlocking {
// latest
testWebservice(
ExchangeRatesService.getRates(ExchangeRatesService.ApiProvider.FER_EE).get(), 4
ExchangeRatesService.getRates(ApiProvider.FER_EE).get(), 4
)
// timeline
testTimeline(
ExchangeRatesService.getTimeline(
ExchangeRatesService.ApiProvider.FER_EE,
ApiProvider.FER_EE,
Currency.EUR, Currency.ISK
).get()
)
Expand Down

0 comments on commit 2aab3f1

Please sign in to comment.