Example #1
0
        public RowTestCase CreateRowTestCase(Attribute row, MethodInfo method)
        {
            if (row == null)
            {
                throw new ArgumentNullException("row");
            }

            if (method == null)
            {
                throw new ArgumentNullException("method");
            }

            object[] rowArguments = RowTestFramework.GetRowArguments(row);
            rowArguments = FilterSpecialValues(rowArguments);

            string testName = RowTestFramework.GetTestName(row);
            Type   expectedExceptionType = RowTestFramework.GetExpectedExceptionType(row);

            RowTestCase testCase = new RowTestCase(method, testName, rowArguments);

            if (expectedExceptionType != null)
            {
                //testCase.ExceptionExpected = true;
                //testCase.ExpectedExceptionType = expectedExceptionType;
                //testCase.ExpectedMessage = RowTestFramework.GetExpectedExceptionMessage(row);
                testCase.ExceptionProcessor = new ExpectedExceptionProcessor(testCase, row);
            }

            return(testCase);
        }
Example #2
0
		public RowTestCase CreateRowTestCase(Attribute row, MethodInfo method)
		{
			if (row == null)
				throw new ArgumentNullException("row");
			
			if (method == null)
				throw new ArgumentNullException("method");
			
			object[] rowArguments = RowTestFramework.GetRowArguments(row);
			rowArguments = FilterSpecialValues(rowArguments);
			
			string testName = RowTestFramework.GetTestName(row);
			Type expectedExceptionType = RowTestFramework.GetExpectedExceptionType(row);
			
			RowTestCase testCase = new RowTestCase(method, testName, rowArguments);
			if (expectedExceptionType != null)
			{
                //testCase.ExceptionExpected = true;
                //testCase.ExpectedExceptionType = expectedExceptionType;
                //testCase.ExpectedMessage = RowTestFramework.GetExpectedExceptionMessage(row);
                testCase.ExceptionProcessor = new ExpectedExceptionProcessor(testCase, row);
			}

			return testCase;
		}