-
Notifications
You must be signed in to change notification settings - Fork 289
Closed
Description
Description
Upon upgrading unit tests from legacy MSTest to MSTest v2, I ran into the following breaking change. TestMethods throw exceptions if there are parameters, rather than getting skipped.
Steps to reproduce
Repro code:
[TestClass]
public class UnitTests
{
[TestMethod]
public void Works()
{
Assert.IsTrue(true);
}
[TestMethod]
public void Breaks(string name)
{
Assert.IsTrue(true);
}
[TestMethod]
public void AlsoBreaks(bool flag = false)
{
Assert.IsTrue(true);
}
}
Expected behavior
Legacy MSTest would ignore these methods completely. No errors or exceptions and they wouldn't get run. It would be somewhat useful if "AlsoBreaks" would get run using the default parameter values.
Actual behavior
Unit test framework throws a cryptic exception: "Parameter count mismatch".
Environment
Version .18 of MSTest on VS2015
Metadata
Metadata
Assignees
Labels
No labels