Testing for equality Floating point numbers is usually a bad idea, this because rounding occurs with floating point operations and you need to test with a tolerance. Suppose you test that some algorithm produces the expected result and you find that unit test fails with this message. SharpTestsEx.AssertException : 2.36 Should Be Equal To 2.36. [...]
Actually SharpTestEx is my favorite way to make assertions in Unit testing. It has a lot of advantages, first of all it permits to write really clear assertions, then it works on the main Unit testing framework, so I can use the same assertion syntax for nunit and for MStest or MbUnit etc etc. Another [...]
Continue reading about Writing a custom assertion for SharpTestEx
I’ve build during years a test helper infrastructure that permits me to decorate a test fixture with some custom attributes that are capable to execute code before and after fixture setup/teardown or test setup/teardown. Now my dear friend Ugo needs for Dexter a modified version of this framework to be able to apply attributes directly [...]
I use AutoMockingContainer extensively in my test projects, and I ‘ve build over time an automocking container that satisfy all of my needs. Thanks to Castle Windsor, using complex logic with the AutomockingContainer is a breeze. Suppose you have this ViewModel Figure 1: ViewModel under test The only aspect I’m interested in is the SelectedLinkResult [...]
Continue reading about Castle and Automock, avoid resolving properties
Some days ago the Feature pack 2 was released. This pack will extend testing capabilities of VS2010, and one of the coolest addition is a graphical editor for the UIMap of Coded UI test. Another killer feature is the official support to run coded ui test With Mozilla firefox 3.5 or higher and support for [...]





