Last active
March 13, 2020 01:19
-
-
Save SDiamante13/97af9533ec9af9620ceff5774e0124b6 to your computer and use it in GitHub Desktop.
An example of a failed async test.
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 | |
| public void getData_returnsData_whenAsyncThreadIsComplete() { | |
| String expectedData = "Here's your data!"; | |
| doNothing().when().processData(any(Runnable.class)); | |
| String result = myService.getData().toString(); | |
| Assertions.assertThat(result).isEqualTo(expectedData); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment