I am writing my UnitTests in a seperate Project from my Project under Test. To be able to test Internal
classes/members I use the [InternalsVisibleTo]
Attribute in my Project Under Test.
#if "BUILD_CONFIGURATION"
[assembly: InternalsVisibleTo("Tests_ProjectUnderTest")]
#endif
Following question arises:
Which Build configuration should I use for Unit Tests? The Internal
s shouldn't be visible in my released code, so #if RELEASE
is not possible. On the other hand #if DEBUG
doesn't really test what I want to release.
Should you have a distinct UNIT_TEST
-Configuration? Or how would/do you do this?