First time here? You are looking at the most recent posts. You may also want to check out older archives or the tag cloud. Please leave a comment, ask a question and consider subscribing to the latest posts via RSS. Thank you for visiting! (hide this)

Unit Test

There are 3 entries for the tag Unit Test

MSTest Tip: Double click to go to failing test

When you run a test suite, Visual Studio shows the results in a grid: the passing ones with the green icon and the failing one with the red icon. By default, if you double click on the line with the test, Visual Studio shows the details of the test, with the stack trace and the details of the exception. If you right click on the line and you select “Open Test” you will go to the test case, on the line that caused the error. But if you follow a TDD approach, you want to go straight the test with just...

Testing ASP.NET MVC on DotNetSlackers

My second article on the ASP.NET MVC is now live on DotNetSlackers. This time the article is about how to test ASP.NET MVC web applications: unit testing, how the ASP.NET MVC framework facilitates testing and how to test Controllers, both with mocking and with the Extract and Overide Call method. Check it out here: ASP.NET MVC Framework – Part 2: Testing Any comment is welcome. If you missed the first article, with a introduction to the ASP.NET MVC framework you can read it here: ASP.NET MVC Framework – Part 1. Technorati Tag: aspnetmvc,unit test,article,dotnetslackers

How to simulate RowTest with MS Test

One of the best feature that is in mbUnit since 2004 is RowTest, which is the ability to perform the same test using different input data and expected results. RowTest [RowTest] [Row(1,1,2)] [Row(2,1,3)] [Row(1,-1,0)] public void SumTest(int a1, int a2, int result) { Assert.AreEqual(a1 + a2, result); } The cool thing is that each "row" is treated as a different test, and if the test fails for one set of data, the others might not. And this helps pinpointing the data that are making the test to fail. This week I was adding...