I have a simple C# UnitTest project with a single test that targets .net 4.5.2
The test looks like this:
[TestMethod]
public void TestMethod()
{
Assert.AreEqual("A © B © C © D ☺ E 𑄑 F", HttpUtility.HtmlDecode("A © B © C © D ☺ E 𑄑 F"));
}
When I run the test in VS2015 everything passes as expected.
The problem is when I run the test using MSTest. The test fails with the output
Assert.AreEqual failed. Expected:<A © B © C © D ☺ E 𑄑 F>. Actual:<A © B © C © D ☺ E 𑄑 F>.
Based on the Actual output it appears to be using .net 4 which is not the target framework of my project.
I'm running mstest.exe from
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\MSTest.exe
Am i doing something wrong here or is there a different version of MSTest I should be using?
EDIT: Looking at the MSTest output I think my logic is backwards here. MSTest is correctly failing where Visual Studio is not.