public static void runTest()
        {
            s_utils = new EnumerableUtils();

            s_utils.CreateTestDirs();

            TestIEnumerator();
            TestClone();

            s_utils.DeleteTestDirs();

            Assert.True(s_utils.Passed);
        }
示例#2
0
    public void runTest()
    {
        s_utils = new EnumerableUtils();

        s_utils.CreateTestDirs(TestDirectory);

        TestIEnumerator();
        TestClone();

        s_utils.DeleteTestDirs();

        Assert.True(s_utils.Passed);
    }
示例#3
0
        public void RunTests()
        {
            utils = new EnumerableUtils();

            utils.CreateTestDirs(TestDirectory);

            TestFileAPIs();

            TestFileExceptions();

            utils.DeleteTestDirs();

            Assert.True(utils.Passed);
        }
示例#4
0
        public void RunTests()
        {
            utils = new EnumerableUtils();

            utils.CreateTestDirs(TestDirectory);

            TestFileAPIs();

            TestFileExceptions();

            utils.DeleteTestDirs();

            Assert.True(utils.Passed);
        }
示例#5
0
        public static void RunTests()
        {
            s_utils = new EnumerableUtils();

            s_utils.CreateTestDirs();

            TestDirectoryInfoAPIs();

            TestExceptions();

            TestWhileEnumerating();

            s_utils.DeleteTestDirs();

            Assert.True(s_utils.Passed);
        }
        public static void RunTests()
        {
            s_utils = new EnumerableUtils();

            s_utils.CreateTestDirs();

            TestDirectoryInfoAPIs();

            TestExceptions();

            if (Interop.IsWindows) // test currently relies on the explicit order being returned on Windows
            {
                TestWhileEnumerating();
            }

            s_utils.DeleteTestDirs();

            Assert.True(s_utils.Passed);
        }
        public static void runTest()
        {
            s_utils = new EnumerableUtils();

            s_utils.CreateTestDirs();

            TestDirectoryAPIs();

            TestExceptions();

            if (Interop.IsWindows) // test relies on the explicit order being returned on Windows
            {
                TestWhileEnumerating();
            }

            s_utils.DeleteTestDirs();

            Assert.True(s_utils.Passed);
        }
示例#8
0
        private static void DoGetDirectories_Add()
        {
            String chkptFlag = "chkpt_dgdm_";
            int    failCount = 0;

            s_utils.CreateTestDirs();

            // directoryinfo
            DirectoryInfo di = new DirectoryInfo(s_utils.testDir);
            IEnumerable <DirectoryInfo> dis     = di.EnumerateDirectories("*", SearchOption.AllDirectories);
            HashSet <String>            disAsHS = new HashSet <string>();
            int count = 0;

            try
            {
                foreach (DirectoryInfo d in dis)
                {
                    disAsHS.Add(d.FullName);
                    count++;
                    if (count == 2)
                    {
                        s_utils.ChangeFSAdd();
                    }
                }
                if (!disAsHS.SetEquals(s_utils.expected_Dirs_Changed))
                {
                    failCount++;
                    Console.WriteLine(chkptFlag + "1: didn't get expected directories....");
                    foreach (DirectoryInfo d in dis)
                    {
                        Console.WriteLine(d.FullName);
                    }
                }
            }
            catch (Exception ex)
            {
                failCount++;
                Console.WriteLine(chkptFlag + "2: got wrong exception");
                Console.WriteLine(ex);
            }

            String testName = "addFilesWhileEnumerating";;

            s_utils.PrintTestStatus(testName, "DirectoryInfo.EnumerateDirectories", failCount);
        }