Example #1
0
        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);
        }
Example #2
0
        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);
                }
            }
        }
Example #3
0
		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);
			}
		}
Example #4
0
		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;
		}