示例#1
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="baseCase"></param>
        public static void Add(BaseCase baseCase)
        {
            var args = new CaseEventArgs() { Case = baseCase };

            CaseEventHandle temp = Casehandle;
            if (temp != null)
            {
                foreach (CaseEventHandle handler in temp.GetInvocationList())
                {
                    handler.BeginInvoke(null, args, new AsyncCallback(EndAsync), null);
                }
            }
        }
示例#2
0
        private static void ProcessCase(object sender, CaseEventArgs args)
        {
            if (args == null || args.Case == null)
            {
                return;
            }

            try
            {
                args.Case.TestCase();
            }
            catch (Exception ex)
            {
                string msg = string.Format("\"{0}\"用例>>测试失败:{1}", args.Case.Name, ex);
                TraceLog.WriteLine(msg);
            }
        }
示例#3
0
        private static void ProcessCase(object sender, CaseEventArgs args)
        {
            if (args == null || args.Case == null)
            {
                return;
            }

            try
            {
                args.Case.TestCase();
            }
            catch (Exception ex)
            {
                string msg = string.Format("\"{0}\"用例>>测试失败:{1}", args.Case.Name, ex);
                TraceLog.WriteLine(msg);
            }
        }
示例#4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="baseCase"></param>
        public static void Add(BaseCase baseCase)
        {
            var args = new CaseEventArgs()
            {
                Case = baseCase
            };

            CaseEventHandle temp = Casehandle;

            if (temp != null)
            {
                foreach (CaseEventHandle handler in temp.GetInvocationList())
                {
                    handler.BeginInvoke(null, args, new AsyncCallback(EndAsync), null);
                }
            }
        }