示例#1
0
        private static void CheckTestFixtureIsValid(TestFixture fixture)
        {
            if (fixture.TypeInfo.ContainsGenericParameters)
            {
                fixture.MakeInvalid(NO_TYPE_ARGS_MSG);
            }
            else if (!fixture.TypeInfo.IsStaticClass)
            {
                Type[] argTypes = Reflect.GetTypeArray(fixture.Arguments);

                if (!Reflect.GetConstructors(fixture.TypeInfo.Type, argTypes).Any())
                {
                    fixture.MakeInvalid("No suitable constructor was found");
                }
            }
        }