I'm working on an application extremely heavily dependent on, effectively, data access which while the devs have done a great job abstracting the data access, ever so often something is difficult to test as is due to data access. I've been getting around some of this using preprocessor directives.
Long story short I've encapsulated each of my unit test classes with preprocessor commands of #if UnitTest (which is defined in the properties of each and every project under the solution configuration of "UNITTEST"), alongside anything I need to add into methods to make them testable. However while NCrunch runs the unit tests without issue (again, which are all under #if UnitTest/#endif), it seems to flat out ignore any #if UnitTest found in one project, even if Visual Studio acts on them.
I've verified numerous times that NCrunch Configuration for the project in question (as well as every other project in the solution) are using the build configuration of "UNITTEST," but to no avail.
Long story even shorter: It works for Visual Studio 2010, but not NCrunch, and the only NCrunch setting I can think of seems to be set correctly.
Any pointers as to what I might be doing incorrectly?