Beispiel #1
0
    public Task Simple()
    {
        var directory = Path.Combine(AssemblyLocation.CurrentDirectory, "SnippetFileFinder/Simple");
        var finder    = new SnippetFileFinder();
        var files     = finder.FindFiles(directory);

        return(Verifier.Verify(files));
    }
Beispiel #2
0
    public Task VerifyLambdasAreCalled()
    {
        var directories     = new ConcurrentBag <string>();
        var targetDirectory = Path.Combine(AssemblyLocation.CurrentDirectory,
                                           "SnippetFileFinder/VerifyLambdasAreCalled");
        var finder = new SnippetFileFinder(
            directoryFilter: path =>
        {
            directories.Add(path);
            return(true);
        }
            );

        finder.FindFiles(targetDirectory);
        return(Verifier.Verify(directories.OrderBy(file => file)));
    }