Created
May 13, 2019 08:55
-
-
Save eoinahern/a1db7c1b1e61dc7eebb30e8fcc647d43 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
fun testGetCurrency() { | |
val item: Pair<DomainCurrency, List<DomainCurrency>> = Pair( | |
DomainCurrency("USD", "1.00", 2, "US DOLLAR"), | |
listOf(DomainCurrency("EUR", "12.00", 1, "EURO")) | |
) | |
given { | |
runBlocking { mockUsecase.executeUsecase(any()) } | |
}.willReturn(Either.Right(item)) | |
currencyViewModel.observeData().observeForever { | |
val domain = it.first | |
Assert.assertEquals(domain.amount, "zzzzz") | |
Assert.assertEquals(domain.currencySymbol, "cccc") | |
} | |
runBlocking { | |
currencyViewModel.getCurrencyList() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment