Ejemplo n.º 1
0
 public static TestSuite CreateTestSuite(MethodInfo method)
 {
     var suite = new DecompilationTestSuite(method);
     NUnitFramework.ApplyCommonAttributes(method, suite);
     PopulateTestSuite(method, suite);
     return suite;
 }
        public static TestSuite CreateTestSuite(MethodInfo method)
        {
            var suite = new DecompilationTestSuite(method);

            NUnitFramework.ApplyCommonAttributes(method, suite);
            PopulateTestSuite(method, suite);
            return(suite);
        }
Ejemplo n.º 3
0
        private static void PopulateTestSuite(MethodInfo method, DecompilationTestSuite suite)
        {
            DecompilationTestAttribute attribute = GetDecompilationTestAttribute(method);

            if (attribute == null)
                throw new ArgumentException();
            

            foreach (var value in Enum.GetValues(typeof(TestCaseType)))
            {
                var test = CreateTestCase(method, (TestCaseType)value,attribute.Filename,attribute.ResultFilename);
                if (test != null)
                    suite.Add(test);
            }
        }
        private static void PopulateTestSuite(MethodInfo method, DecompilationTestSuite suite)
        {
            DecompilationTestAttribute attribute = GetDecompilationTestAttribute(method);

            if (attribute == null)
            {
                throw new ArgumentException();
            }


            foreach (var value in Enum.GetValues(typeof(TestCaseType)))
            {
                var test = CreateTestCase(method, (TestCaseType)value, attribute.Filename, attribute.ResultFilename);
                if (test != null)
                {
                    suite.Add(test);
                }
            }
        }