Sometimes ago NUnit extend their framework with a possibility to specify parameters via an attribute and then these parameters are reused by NUnit run-time and the test method is executed several times with different parameters. An example: let’s assume that we have a method that concatenates person first name and person last name.
[...]
In my previous post I wrote that a unit test that uses a real file on a disk is more like an integration test than as a unit test. Well, I think that I wasn’t completely right because if you write a test that creates a file before the test and after the test your [...]
Sometimes we should develop a class that will load some information from a file and to store this information in some object-oriented form in order to be further used by other application classes. In this post I’ll try to share with you how I’ve developed such a class for my SQLCEPad tool using TDD practices. [...]
Sometimes ago I developed a simple tool for creating and executing SQL statements against SQL CE 3.5 database. Yesterday, I’ve decided to re-develop and improve it in a new version. I’ve started with implementation of data access part of it. The data access is very simple; it retrieves all needed DB schema meta-data that the [...]
Today, a colleague of mine Alex and me run into an exception thrown by Rhino.Mocks Framework by Ayande Rahien. How does it happen?
Let’s say that we have code like this.
1: [Test]
2: public void TestSomeMethod()
3: {
4: MockRepository mocks = new [...]
Few weeks ago, I wrote about how to extend Nunit to support RollBack attribute and how to execute unit tests against database and keep it unchanged.
Today, I’ve tried to achieve the same functionality but using AOP. Actually, I’ll use PostSharp platform in order to weave needed code in each test method decoreted with RollBackAttribute. PostSharp [...]