Exemple #1
0
        internal Test(string name, Action action, int count, ITestGroup testGroup)
        {
            if (string.IsNullOrWhiteSpace(name))
            {
                throw new ArgumentException("Test name cannot be null or empty", "name");
            }

            if (action == null)
            {
                throw new ArgumentNullException("action", "Action delegate cannot be null");
            }

            if (count < 1)
            {
                throw new ArgumentOutOfRangeException("count", "Execution count must be at least 1");
            }

            if (testGroup == null)
            {
                throw new ArgumentNullException("testGroup", "Test group cannot be null");
            }

            Name = name;
            Action = action;
            Count = count;
            TestGroup = testGroup;
        }
Exemple #2
0
        internal Test(string name, Action action, int count, ITestGroup testGroup)
        {
            if (string.IsNullOrWhiteSpace(name))
            {
                throw new ArgumentException("Test name cannot be null or empty", "name");
            }

            if (action == null)
            {
                throw new ArgumentNullException("action", "Action delegate cannot be null");
            }

            if (count < 1)
            {
                throw new ArgumentOutOfRangeException("count", "Execution count must be at least 1");
            }

            if (testGroup == null)
            {
                throw new ArgumentNullException("testGroup", "Test group cannot be null");
            }

            Name      = name;
            Action    = action;
            Count     = count;
            TestGroup = testGroup;
        }
Exemple #3
0
 private void ExecuteTestGroup(ITestGroup testGroup)
 {
     testGroup.Initialize();
     testGroup.Run();
     testGroup.Results();
 }