Skip to content

Instantly share code, notes, and snippets.

@frootloops
Created August 6, 2021 09:10
Show Gist options
  • Save frootloops/2286d3381c17ee8437282dab3087eb82 to your computer and use it in GitHub Desktop.
Save frootloops/2286d3381c17ee8437282dab3087eb82 to your computer and use it in GitHub Desktop.
// preparation
let builder = Builder()
let repository = builder.makeRepository()
// actual test
builder.priceAlertStorageService.cachedPriceAlertsMockFunc
.returns([.sample(id: "1"), .sample(id: "2")])
let result = repository.cachedPriceAlerts(symbol: "AAPL")
expect(result.map { $0.id }) == ["1", "2"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment