Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

seanksullivan
Copy link

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.

…nd Extensions between existing nUnit and MSTest2 tests. Created base MSTest2 class and test.
…STest2 unit tests are very similar to nUnit tests.

Both frameworks have their strengths and weaknesses - fyi: my comfor zone is MSTest2, but I appreciate some of the functionality that nUnit has to offer .
…ration purposes. Excluded all test and test-tool classes from Code Coverage collection. FYI - you need the VS Enterprise SKU to view code coverage results.
@jnm2
Copy link
Contributor

jnm2 commented Jul 6, 2017

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? 😝)

@dotnet dotnet deleted a comment from msftclas Sep 26, 2017
@dotnet dotnet deleted a comment from msftclas Sep 26, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants