Vote UpVote

DUnit and TCustomAttributes

Random thoughts on coding – In this article I am playing with Unit tests and TCustomAttributes as I am working on different ideas to build up a lightweight testing framework.  Basically I liked the idea of TestCase attribute from NUnit and I wanted to do something similar using TCustomAttributes and accessing those attributes using the Delphi RTTI library. To understand better my purposes have a look at the following example extracted from NUnit webpage:[TestCase(12,3,4)][TestCase(12,2,6)][TestCase(12,4,3)]public void DivideTest(int n, int d, int q){ Assert.AreEqual( q, n / d );}This simple example will execute ...
Favorite? Off-Topic? Jordi Corbilla @ 2012-04-06 02:28


Visits: 831
Votes: 6
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Daniele Teti
Jordi Coll Corbilla
Paul Thornton
Stefan Glienke
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News


Please login or register to use this functionality.
(click on this box to dismiss)