public async Task TestDirectoryDeleteAsync() { await using var tmpDir = _baseFixture.WithDisposableTempDirectory(_snapFilesystem); var rootDirectory = _snapFilesystem.PathCombine(tmpDir.WorkingDirectory, "rootDirectory"); _snapFilesystem.DirectoryCreate(rootDirectory); var subDirectory = _snapFilesystem.PathCombine(rootDirectory, "subDirectory"); _snapFilesystem.DirectoryCreate(subDirectory); var testFile = _snapFilesystem.PathCombine(subDirectory, "mytEstFile.txt"); await _snapFilesystem.FileWriteUtf8StringAsync("yolo", testFile, default); await _snapFilesystem.DirectoryDeleteAsync(rootDirectory); Assert.False(_snapFilesystem.DirectoryExists(rootDirectory)); }