Last active
April 8, 2018 03:45
-
-
Save brianhsu/f48c2cd79b5fc284de5b8ecae1054069 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
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