Do you put unit tests in same project or another project?

Separate project, but in the same solution. (I’ve worked on products with separate solutions for test and production code – it’s horrible. You’re always switching between the two.)

The reasons for separate projects are as stated by others. Note that if you’re using data-driven tests, you might end up with quite a significant amount of bloat if you include the tests in the production assembly.

If you need access to the internal members of the production code, use InternalsVisibleTo.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)