Exemple #1
0
        private bool InvalidTestSuite(Type type)
        {
            if (Reflect.IsTestCaseClass(type))
            {
                if (!Reflect.HasConstructor(type, typeof(string)))
                {
                    this.runState     = RunState.NotRunnable;
                    this.ignoreReason =
                        string.Format("Class {0} has no public constructor TestCase(string name)", type.Name);
                    //this.AddInvalidTestCase(type.Name, ignoreReason);
                    return(true);
                }
            }
            else
            {
                if (!Reflect.HasConstructor(type))
                {
                    this.runState     = RunState.NotRunnable;
                    this.ignoreReason = string.Format("Class {0} has no default constructor", type.Name);
                    //this.AddInvalidTestCase(type.Name, ignoreReason);
                    return(true);
                }
            }

            return(false);
        }
Exemple #2
0
        private bool InvalidTestSuite(Type type)
        {
            if (!Reflect.HasConstructor(type))
            {
                this.runState     = RunState.NotRunnable;
                this.ignoreReason = string.Format("Class {0} has no default constructor", type.Name);
                return(true);
            }

            return(false);
        }