Some of our data tests won't work with Resharper so I have to rely on MSTest which I am getting used to. If one does an assert like so...
Assert.IsTrue(unlucky == 13);
Oh, wait, as I type this I realize that I should really use:
Assert.AreEqual(unlucky,13);
...as otherwise there is no way to see what the value compared to 13 is when the test fails (Duh) unless one does something like this...
Assert.IsTrue(unlucky == 13, unlucky.ToString());
The second parameter above is a message to give in the case of a failing test.
Other things to mention...
- in the "Test Results" pane, right-click on a test and select "View Test Results Details" to see further specs
- one may set breakpoints in a test in Visual Studio and then run the test and stop at the breakpoints... set a breakpoint, and then Ctrl-F+T at the top of the test method to run the test
No comments:
Post a Comment