Skip to content

Instantly share code, notes, and snippets.

@brianhsu
Last active April 8, 2018 03:45
Show Gist options
  • Save brianhsu/f48c2cd79b5fc284de5b8ecae1054069 to your computer and use it in GitHub Desktop.
Save brianhsu/f48c2cd79b5fc284de5b8ecae1054069 to your computer and use it in GitHub Desktop.
val useCase = new BaseUseCase[Int] {
def execute() = 100
}
var isCalled = false
var useCaseResult: Try[Int] = Failure(new NoSuchElementException)
executor.execute(useCase) { result =>
isCalled = true
useCaseResult = result
}
isCalled shouldBe true
useCaseResult shouldBe Success(100)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment