I would like to switch between NUnit and VS Tests as follows:
#if !NUNIT
using Microsoft.VisualStudio.TestTools.UnitTesting;
#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.String;
using DeploymentItem = NUnit.Framework.DescriptionAttribute;
#endif
My question is, how can I declare a NUNIT preprocessor symbol in one place (App.config or so, it will be great), is it easy to switch between NUnit and VSTests? Because when I use #define NUNIT, it only works for the file where it is written.
Steve source
share