My Spring.Net context file for an NUnit class is not being found. My question is where do I put the Spring.Net context file so it can be found by the NUnit test? I'm using Spring.Net 1.3.2 (that is the version defaulted to by NuGet) and the Spring.Net integration with NUnit. The unit test is not finding the context file specified via AbstractDependencyInjectionSpringContextTests.
This is my first .Net project project so I'm probably missing something basic. In my solution my main C# project would have an assembly/project name of MyAssembly. Then I created a test project in the same solution with a name MyAssemply.Test. Initially I created my unit test class and its context file in the root directory of the project. The context file is flagged as an Embedded Resource and Do Not Copy. The Resource URI is "assembly://MyAssembly.Test/MyNamespace/EmailManagerTestContext.xml". I keep getting a null pointer.
So I tried using the AssemblyResource class without extending the Spring.Net AbstractDependencyInjectionSpringContextTests class. That also came up null and did not tell me where it was expecting the file to be. I also used Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)
and found that the project was being built in the temp directory on another drive. I tried moving the class and context XML file into the folder with the same name as the namespace, but that did not work. I've seen some examples where the directory structure is not the same as the namespace as it is with Java packages, so I am a little confused. Thank you for any help.