Gage Trader
Gage Trader

Reputation: 363

Best Approach to verify public methods of a class have unit tests?

I have tried searching around the web and on SO, but haven't seen much discussion about t (or maybe I'm just not using the right keywords).

What I would like to do is write a script (or use a utility that already exists) to verify that a class or set of classes has unit tests written for them in the test project.

I've got a release coming up, and I want to make sure that all public methods of my business layer have unit tests. I'm trying to get everyone on board with TDD, but it hasn't happened yet.

I've got a pretty basic idea of how I would write a script to check this (open file, parse method signatures into some list, open corresponding test class file and check that each method in the list exists somewhere in the test file), but I wanted to see what other options are available.

Upvotes: 0

Views: 64

Answers (1)

Austin Salonen
Austin Salonen

Reputation: 50235

.Net code coverage tools, such as NCover & dotCover, already exist. I would use one of those and read their reports.

Upvotes: 2

Related Questions