Four Ways to Fake Time
Are your unit tests failing because the code-under-test is coupled to the system clock? In other words, does the method you are testing use the System.DateTime.Now property, and that dependency is...
View ArticleFour Ways to Fake Time, Part 2
In Part 1 of this four part series you learned how a code’s implicit dependency on the system clock can make the software difficult to test. The first post presented a very simple solution, pass in the...
View ArticleFour Ways to Fake Time, Part 3
In Part 2 of this four part series you learned how to use a class property to change the code’s dependency on the system clock to make the code easier to test. Adding the Now property is effective,...
View ArticleFour Ways to Fake Time, Part 4
The is the fourth and final part in the Four Ways to Fake Time series. In Part 3 you learned how to use the IClock interface to improve testability. Using the IClock interface is very effective for new...
View ArticleFake 555 Telephone Number Prefix and More
Unless you want your automated tests to send a text message to one of your users, you ought to use a fake phone number. In the U.S., there is the “dummy” 555 phone exchange, often used for fictional...
View ArticleKeep Your Privates Private
Often I am asked variations on this question: Should I unit test private methods? The Visual Studio Team Test blog describes the Publicize testing technique in Visual Studio as one way to unit test...
View ArticleAutomated Unit and Integration Testing with NDbUnit
The sample code from the May 1, 2012 presentation of Automated Unit and Integration Testing with NDbUnit to the CMAP Main Meeting is available on GitHub: https://github.com/ruthlesshelp/Presentations....
View ArticleThank You Philly.NET Code Camp 2012.1
Although I have been developing software for more than 20 years, on Saturday I went to my first Code Camp. I delivered one session at Philly.NET Code Camp on the topic of Automated Unit and Integration...
View ArticleThank You LI.NET Users Group
Yesterday I traveled up to Long Island, New York to present at the LI .NET Users Group. A very big thank you to the LI.NET organizers for putting together a great September meeting. I especially...
View ArticleThank You Upstate New York Users Groups
In November I traveled to Upstate New York to present at four .NET Users Group. Here’s the overview: The first stop was in Albany on Monday, Nov. 12th to present at the Tech Valley Users Group (TVUG)...
View ArticleBoundary Analysis
For every method-under-test there is a set of valid preconditions and arguments. It is the domain of all possible values that allows the method to work properly. That domain defines the method’s...
View Article
More Pages to Explore .....