Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between C# Test Project and C# Class library Project

Tags:

c#

Whats the motivation behind using c# test project rather then c# class library project to hold my unit tests?

Thanks.

like image 754
farooq ijaz Avatar asked Aug 28 '13 21:08

farooq ijaz


1 Answers

The test project will, by default, have all the MSTest references added for you automatically. Also some default examples, such as a simple example test, is created for you.

With the class project, you can build a test project from that too, but you manually have to add the MSTest references yourself. Not a major problem really, but the test project can save you time and hassle.

EDIT:

As noted in the comments, the big difference between the two project types is that, with a class project, you can choose whichever unit testing framework you like.

like image 74
Jason Evans Avatar answered Oct 11 '22 03:10

Jason Evans