Created
June 26, 2021 07:54
-
-
Save orcchg/3392fd461b0f8942b8891beb3fab5c95 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| class FakeStockListInteractor @Inject constructor() : StockListInteractor { | |
| override fun stocks(): Single<List<Stock>> = | |
| Single.just( | |
| listOf( | |
| Stock( | |
| name = "Apple Inc.", | |
| ticker = "AAPL", | |
| price = 131.93.money() | |
| ), | |
| Stock( | |
| name = "Alphabet Class A", | |
| ticker = "GOOGL", | |
| price = 1825.0.money() | |
| ), | |
| Stock( | |
| name = "Microsoft Corporation", | |
| ticker = "MSFT", | |
| price = 234.12.money() | |
| ), | |
| Stock( | |
| name = "Tesla Motors", | |
| ticker = "TSLA", | |
| price = 599.08.money() | |
| ) | |
| ) | |
| ) | |
| override fun stock(ticker: String): Maybe<Stock> = | |
| Maybe.just( | |
| Stock( | |
| name = "Fake Stock", | |
| ticker = ticker, | |
| price = 250.51.money() | |
| ) | |
| ) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment