Created
March 18, 2021 03:00
-
-
Save Senemix29/b1af076490d1c07374aff3ebde50f690 to your computer and use it in GitHub Desktop.
Example of Android Instrumented Unit Test Using Espresso
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 | |
| fun shouldReturnNumberOfFilesInsideADirectory() { | |
| //Given | |
| val bananaDirectory = "bananas" | |
| createFileAtInternalDirectory(context, bananaDirectory, "prata") | |
| createFileAtInternalDirectory(context, bananaDirectory, "d'agua") | |
| createFileAtInternalDirectory(context, bananaDirectory, "nanica") | |
| //When | |
| val directoryFileListSize = | |
| FileUtils().getInternalDirectoryFilesListSize(context, bananaDirectory) | |
| //Then | |
| assertEquals(3, directoryFileListSize) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment