Sunday, July 02, 2006

Testing .Net Properties with FIT

Just got a comment on .Net and FIT from a blog reader. This caused me to remember that I submitted a proposed patch to source forge, artifact 1255429, which deals with using properties instead of member variables. The patch was submitted to source forge in August of 2005. Nothing as of this post has been done, that I am aware of, so I thought I would put it out for public consumption and comment.

In more detail, fixtures deriving from RowFixture have instantiated classes with public variables, instead of exposing the instantiated object’s members via public properties. With these modifications you can write fixtures directly against objects under test, which are typically the actual application classes, exposing properties instead of variables to the RowFixtures. This enables the .Net developer to avoid writing additional code beyond the fixture and the actual application objects under test.

Here it is.

No comments: