I have unit tests that require they run specifically as x86 and x64. The problem I'm having is I can't ever run all unit tests because I have to switch the framework from the Test menu. Is there any better way to do this in a more automated fashion? Ideally there would be an Attribute I could use to specify if a test was specifically x86 or x64. Here's an example of my code:
[TestMethod]
public void Testx86_Success()
{
if (!Environment.Is64BitProcess)
{
//Arrange
...
//Act
...
//Assert
Assert.IsTrue(true);
}
else
{
Assert.Inconclusive("Can't test x64 while running in x86 process.");
}
}
[TestMethod]
public void Testx64_Success()
{
if (Environment.Is64BitProcess)
{
//Arrange
...
//Act
...
//Assert
Assert.IsTrue(true);
}
else
{
Assert.Inconclusive("Can't test x86 while running in x64 process.");
}
}