??????????????????????????????excel??????????????????????????????????????????????VS????????????????NUnit???????????????

???????????£?

????1.?????????????????excel??????????????????excel

????2.?????excel????????? "??????????"?"??????"?????????????????????

????3.????

????view plain [TestInitialize????] public void MyTestInitialize????

????{ string fileName = Path.Combine??Environment.CurrentDirectory?? "SiteTemplate.xls"????_sites = ExcelHelper.ImportToDataTable??fileName????}

????[TestMethod????] [DeploymentItem??"ExcelTemplate/SiteTemplate.xls"??] public void ValidateTest????

????{ SitesValidator target = new SitesValidator??_sites????Boolean valid = target.Validate??????Console.WriteLine??target.Message????Assert.IsTrue??valid????}

???????????????DeploymentItem????excel??????????????????bin???£??????????????????TestResult??out???£?

????????????????????