前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >单元测试同时支持 NUnit/MSTest

单元测试同时支持 NUnit/MSTest

作者头像
张善友
发布2018-01-22 15:19:38
5130
发布2018-01-22 15:19:38
举报
文章被收录于专栏:张善友的专栏张善友的专栏

让单元测试代码同时支持NUnit/MSTest,可以参照MSDN magazine,也可以参看 Switching Between Using NUnit and MSTest for Unit TestingUsing both MSTest and NUnit?

代码语言:js
复制
using System;
#if !NUNIT    
using Microsoft.VisualStudio.TestTools.UnitTesting;     
using Category = Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute;     
#else     
using NUnit.Framework;     
using TestClass = NUnit.Framework.TestFixtureAttribute;     
using TestMethod = NUnit.Framework.TestAttribute;     
using TestInitialize = NUnit.Framework.SetUpAttribute;     
using TestCleanup = NUnit.Framework.TearDownAttribute;     
using TestContext = System.Object;     
using ClassCleanup = NUnit.Framework.TestFixtureTearDownAttribute;     
using ClassInitialize = NUnit.Framework.TestFixtureSetUpAttribute;     
#endif     

相关文章:

NUnit/MSTest Dual Testing

How to run NUnit tests in Visual Studio 2010/MSTest

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2013-03-24 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档