示例#1
0
        // -------------------------------------
        // This creates the following FileSystem
        // -------------------------------------
        // /a
        //     /a
        //        a.txt
        //     /b
        //        b.i
        //     /C
        //     /d
        //     a.txt
        //     A.txt
        //     b.txt
        //     c.txt1
        //     d.i
        //     f.i1
        //     E
        // /b
        //    b.i
        // /C
        // /d
        // A.txt
        // b.txt
        // c.txt1
        // d.i
        // f.i1
        // E

        protected TestFileSystemBase()
        {
            SystemPath = Path.GetDirectoryName(typeof(TestFileSystemBase).GetTypeInfo().Assembly.Location);
            IsWindows  = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);

            // Use a static lock to make sure a single process is running
            // as we may have changed on the disk that may interact with other tests
            Monitor.Enter(Lock);

            _referenceEnumeratePathsResult = new EnumeratePathsResult(GetCommonPhysicalFileSystem());
        }
示例#2
0
            public void Check(EnumeratePathsResult other)
            {
                AssertEx.Equivalent(TopDirs, other.TopDirs);
                AssertEx.Equivalent(TopFiles, other.TopFiles);
                AssertEx.Equivalent(TopEntries, other.TopEntries);

                AssertEx.Equivalent(AllDirs, other.AllDirs);
                AssertEx.Equivalent(AllFiles, other.AllFiles);
                AssertEx.Equivalent(AllEntries, other.AllEntries);

                AssertEx.Equivalent(AllFiles_txt, other.AllFiles_txt);
                AssertEx.Equivalent(AllFiles_i, other.AllFiles_i);
                AssertEx.Equivalent(AllEntries_b, other.AllEntries_b);
                AssertEx.Equivalent(AllDirs_a1, other.AllDirs_a1);
                AssertEx.Equivalent(AllDirs_a2, other.AllDirs_a2);
            }