Possible Duplicate:
.NET NUnit test - Assembly.GetEntryAssembly() is null
System.Reflection.Assembly assem = System.Reflection.Assembly.GetEntryAssembly();
The code returns null when running a unit test. I am testing for a third party utility that also returns null. I cannot distinguish between the two programs if both of them return null.
What can I do to determine I am running in a unit test context programatically? I do not want to add it to the configuration file because of the point of failure that creates. E.G. I forgot to flip the bit so it gets pushed to Prod in dev mode. My boss pushes to prod. I do not want him to have to repeat a job or change configuration files regularly for obvious political motivations.