assertCount method
Asserts directory holds count files, counting sub-folders when
recursive.
Implementation
void assertCount(String directory, int count, {bool recursive = false}) {
final int found = memory
.filesSync(normalizeDiskPath(directory), recursive: recursive)
.length;
expect(
found,
count,
reason:
'Expected [$count] files at [$directory] on disk [$name], but found [$found].',
);
}