goody
03-09-2005, 08:47 PM
I have a project that I have embedded a configuration file in the assembly.
I have put all my unit tests for the project in a separate assembly. I am referencing the assembly with the embedded config file in my test project. In one of my unit tests I am trying to get an IApplicationContext object using the following:
IApplicationContext ctx = ConfigurationSettings.GetConfig("spring/context") as IApplicationContext;
My app.config file in my test project is as follows:
<configuration>
<configSections>
<sectionGroup name="spring">
<section name="context" type="Spring.Context.Support.XmlApplicationContext, Spring.Core"/>
</sectionGroup>
</configSections>
<spring>
<context>
<resource uri="assembly://metalexis-netcommerce/metalexis.netcommerce.conf.spring/metalexis-domain.xml"/>
</context>
</spring>
The context is always null. What am I doing incorrectly. The dll is being referenced correctly because I can compile and call methods on it.
Thanks,
Matt
I have put all my unit tests for the project in a separate assembly. I am referencing the assembly with the embedded config file in my test project. In one of my unit tests I am trying to get an IApplicationContext object using the following:
IApplicationContext ctx = ConfigurationSettings.GetConfig("spring/context") as IApplicationContext;
My app.config file in my test project is as follows:
<configuration>
<configSections>
<sectionGroup name="spring">
<section name="context" type="Spring.Context.Support.XmlApplicationContext, Spring.Core"/>
</sectionGroup>
</configSections>
<spring>
<context>
<resource uri="assembly://metalexis-netcommerce/metalexis.netcommerce.conf.spring/metalexis-domain.xml"/>
</context>
</spring>
The context is always null. What am I doing incorrectly. The dll is being referenced correctly because I can compile and call methods on it.
Thanks,
Matt