public static CecilTestSuite CreateTestSuite(MethodInfo method) { if (method == null) { throw new ArgumentNullException("method"); } var suite = new CecilTestSuite(method); NUnitFramework.ApplyCommonAttributes(method, suite); PopulateTestSuite(method, suite); return(suite); }
static void PopulateTestSuite(MethodInfo method, CecilTestSuite suite) { var attribute = GetTestCecilAttribute(method); if (attribute == null) { throw new ArgumentException(); } foreach (var value in Enum.GetValues(typeof(TestCaseType))) { var test = CreateTestCase(method, attribute, (TestCaseType)value); if (test != null) { suite.Add(test); } } }
static void PopulateTestSuite (MethodInfo method, CecilTestSuite suite) { var attribute = GetTestCecilAttribute (method); if (attribute == null) throw new ArgumentException (); foreach (var value in Enum.GetValues (typeof (TestCaseType))) { var test = CreateTestCase (method, attribute, (TestCaseType) value); if (test != null) suite.Add (test); } }
public static CecilTestSuite CreateTestSuite (MethodInfo method) { if (method == null) throw new ArgumentNullException ("method"); var suite = new CecilTestSuite (method); NUnitFramework.ApplyCommonAttributes (method, suite); PopulateTestSuite (method, suite); return suite; }