private static void TestSearchPattern(String path, String pattern, String patternDescription, Exception expectedException,
                                              EnumerableUtils.GetFSEs1 fseMethod1, EnumerableUtils.GetFSEs2 fseMethod2, String methodName)
        {
            int    failCount = 0;
            String chkptFlag = "chkpt_nspat_";

            try
            {
                String[] dirs1 = fseMethod1(path, pattern);
                Console.WriteLine(chkptFlag + "1: didn't throw");
                failCount++;
            }
            catch (Exception e)
            {
                if (e.GetType() != expectedException.GetType())
                {
                    failCount++;
                    Console.WriteLine(chkptFlag + "2: threw wrong exception");
                    Console.WriteLine(e);
                }
            }

            if (fseMethod2 != null)
            {
                try
                {
                    String[] dirs2 = fseMethod2(path, pattern, SearchOption.AllDirectories);
                    Console.WriteLine(chkptFlag + "3: didn't throw");
                    failCount++;
                }
                catch (Exception e)
                {
                    if (e.GetType() != expectedException.GetType())
                    {
                        failCount++;
                        Console.WriteLine(chkptFlag + "4: threw wrong exception");
                        Console.WriteLine(e);
                    }
                }
            }

            String testName = String.Format("TestSearchPattern({0})", patternDescription);

            s_utils.PrintTestStatus(testName, methodName, failCount);
        }
        private static void TestSearchOptionOutOfRange(EnumerableUtils.GetFSEs2 fseMethod, String methodName)
        {
            int    failCount = 0;
            String chkptFlag = "chkpt_soor_";

            try
            {
                String[] dirs1 = fseMethod(s_utils.testDir, "*", (SearchOption)5);
                Console.WriteLine(chkptFlag + "1: didn't throw");
                failCount++;
            }
            catch (ArgumentOutOfRangeException) { } // expected
            catch (Exception e)
            {
                failCount++;
                Console.WriteLine(chkptFlag + "2: threw wrong exception");
                Console.WriteLine(e);
            }

            s_utils.PrintTestStatus("TestSearchOptionOutOfRange", methodName, failCount);
        }