Exemple #1
0
        public bool RunTests()
        {
            if (List.Count > 0)
            {
                for (int i = 0; i < List.Count; i++)
                {
                    XmlTest testItem = (XmlTest)List[i];

                    if (testItem != null)
                    {
                        XmlTestEventArgs args =
                            new XmlTestEventArgs(i, testItem.Run(), testItem);

                        if (TestEvent != null)
                        {
                            TestEvent(this, args);
                        }
                    }
                }

                return(true);
            }

            return(false);
        }
Exemple #2
0
 public void OnTest(object sender, XmlTestEventArgs args)
 {
     ++m_nTestCount;
     if (!args.Success)
         m_nFailures++;
     if (args.Test.Thrown != null)            
         m_nExceptions++;
 }
Exemple #3
0
        public void OnSimpleTest(object sender, XmlTestEventArgs args)
        {
            if (m_enumFilterType == XmlTestType.None || 
                args.Test.TestType == m_enumFilterType)
            {
                if (m_bVerbose)
                {
                    Console.WriteLine("Test {0}, {1} ({2} : {3})", 
                        args.Index, args.Success, args.Test.TestType.ToString(),
                        args.Test.Description);
                }

                ++m_nSimpleTestCount;
                if (!args.Success)
                    m_nSimpleTestFailures++;
                if (args.Test.Thrown != null)
                    m_nSimpleTestExceptions++;
            }
        }
        public bool RunTests()
        {
            if (List.Count > 0)
            {
                for (int i = 0; i < List.Count; i++)
                {
                    XmlTest testItem = (XmlTest) List[i];

                    if (testItem != null)
                    {
                        bool run = testItem.Run();
                        if (TestEvent != null)
                        {
                            XmlTestEventArgs args = new XmlTestEventArgs(i, run, testItem);
                            this.TestEvent(this, args);
                        }
                    }
                }

                return true;
            }

            return false;
        }