Created
February 6, 2014 22:40
-
-
Save chbatey/8853955 to your computer and use it in GitHub Desktop.
ScalaTest: Using whenReady to test Futures
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
| test("Test a asynchronous method synchronously - whenReady") { | |
| val underTest = new ClassThatReturnsFutures() | |
| val futureResult = underTest.goDoSomething() | |
| whenReady(futureResult) { result => | |
| result should equal("The result") | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment