public UnitTestMethodContainer RegisterUnitTestMethod(MethodInfo methodInfo, UnitTestCaseContainer unitTestCase)
        {
            UnitTestMethodContainer _unitTestMethodContainer = GetUnitTestMethodContainer(methodInfo);

            _unitTestMethodContainer.CaseList.Add(unitTestCase);
            return(_unitTestMethodContainer);
        }
 /// <summary>
 /// 注册单元测试用例
 /// </summary>
 /// <param name="container"></param>
 public void RegisterUnitTestCase(UnitTestCaseContainer container)
 {
     if (!IsExistSameUnitTestCase(container.UnitTestNamespace, container.ClassName, container.MethodName))
     {
         _UnitTestCaseContainerList.Add(container);
     }
 }
示例#3
0
        /// <summary>
        /// 注册测试接口
        /// </summary>
        /// <param name="unitTestInterface"></param>
        /// <param name="methodName"></param>
        /// <param name="unitTestCase"></param>
        /// <returns></returns>
        public UnitTestContainer RegisterUnitTestInterface(Type unitTestInterface, string methodName, UnitTestCaseContainer unitTestCase)
        {
            UnitTestContainer _unitTestContainer = null;

            if (unitTestInterface.IsInterface)
            {
                UnitTestMethodContainer _unitTestMethodContainer = _UnitTestMethodContainerManager.RegisterUnitTestMethod(unitTestInterface.GetMethod(methodName), unitTestCase);
                _unitTestContainer = GetUnitTestContainer(unitTestInterface);
                _unitTestContainer.TestMethodList.Add(_unitTestMethodContainer);
            }
            return(_unitTestContainer);
        }
示例#4
0
 /// <summary>
 /// 注册单元测试用例
 /// </summary>
 /// <param name="container"></param>
 public void RegisterUnitTestCase(UnitTestCaseContainer container)
 {
     _ContainerManager.RegisterUnitTestCase(container);
 }