I have a problem.
#if DEBUG
ca.ConveyancingAttorneyID = "C0B68DC3-C396-4264-880B-1A699C53A8CE";
ca.ConveyancingFirmID = "C0B68DC3-C396-4264-880B-1A699C53A8CE";
#endif
When we work in debug mode, we hard code the identifier. In the release, it is clearly dynamically installed.
Now, when it comes to unit testing the matching code, I had to do this: (first, I just tested the “Release Case”, which otherwise would fail in Debug mode)
#if RELEASE
Guid id = new Guid("1A92CE5A-D956-486B-9B65-0A3630EF0285");
#endif
#if DEBUG
Guid id = new Guid("C0B68DC3-C396-4264-880B-1A699C53A8CE");
#endif
This is not perfect. And the need to remember (and remind teammates) to always run Unit Tests in Release is also a problem. We do not have a permanent integration installation, so the tests are performed only locally.
NUnit/Visual Studio Testrunner/Resharper Testrunner Release? , , '#if DEBUG' .