Je voudrais passer entre les tests NUnit et VS comme ceci:Declare symbole preprocesor (comme DEBUG) dans le monde pour le projet tout
#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
Ma question est, comment puis-je déclarer symbole preprocesor NUnit à un endroit (App .config ou alors, serait génial), pour basculer entre NUnit et VSTests facilement? Parce que quand j'utilise #define NUNIT
, cela ne fonctionne que pour le fichier, où il est écrit.