Skip to content

Instantly share code, notes, and snippets.

@orcchg
Created June 26, 2021 07:54
Show Gist options
  • Select an option

  • Save orcchg/3392fd461b0f8942b8891beb3fab5c95 to your computer and use it in GitHub Desktop.

Select an option

Save orcchg/3392fd461b0f8942b8891beb3fab5c95 to your computer and use it in GitHub Desktop.
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