資源簡介
C# 單元測(cè)試 各個(gè)方法執(zhí)行順序例子
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Linq;
using?System.Text;
using?System.Threading.Tasks;
using?System.Windows.Forms;
using?Microsoft.VisualStudio.TestTools.UnitTesting;
namespace?P2P.Tests
{
????[TestClass()]
????public?sealed?class?DivideClassTest
????{
????????[AssemblyInitialize()]
????????public?static?void?AssemblyInit(TestContext?context)
????????{
????????????//配置log4net
????????????var?path?=?AppDomain.CurrentDomain.baseDirectory?+?(“\\log4net.config“);
????????????System.IO.FileInfo?file?=?new?System.IO.FileInfo(path);
????????????log4net.Config.xmlConfigurator.ConfigureAndWatch(file);
????????????//MessageBox.Show(“AssemblyInit?“?+?context.TestName);
????????}
????????[ClassInitialize()]
????????public?static?void?ClassInit(T
評(píng)論
共有 條評(píng)論