dotnet / ILMerge

ILMerge is a static linker for .NET Assemblies.
MIT License
1.23k stars 170 forks source link

Added MStest2 test project - to demonstrate similarities with NUnit #21

Open seanksullivan opened 7 years ago

seanksullivan commented 7 years ago

Created a new Test Project, using the MSTest V2 framework, to lightly demonstrate the similarities with NUnit. All of the NUnit tests have been replicated using the MSTest V2 framework, which includes new functionality (DataRow, overrides, etc...). https://github.com/Microsoft/testfx-docs.

jnm2 commented 7 years ago

It's up to @mike-barnett how he wants to manage the project, but as an independent observer, NUnit's Assert.That(x, Contains.Substring(x)) instead of Assert.IsTrue(x.Constains(y)) and Assert.That(x, Is.EqualTo(y)) instead of CollectionAssert and so on are a really a more intuitive and readable style and provide rich semantic failure messages. Back when I picked up NUnit, I came for the TestCaseSource and stayed for the constraint DSL because it's so nice to work with.

Which is another thing. MSTest2 doesn't have TestCaseSource, does it? If I remember correctly it has had DataRow for a really long time, but no ability to generate a dynamic number of test cases.

(Why is [ExcludeFromCodeCoverage] everywhere, especially on non-test classes? 😝)