public void SingleConfigLocation() { XmlApplicationContext ctx = new XmlApplicationContext(false, "assembly://Oragon.Spring.Core.Tests/Oragon.Spring.Context.Support/simpleContext.xml"); Assert.IsTrue(ctx.ContainsObject("someMessageSource")); ctx.Dispose(); }
public void MultipleConfigLocations() { XmlApplicationContext ctx = new XmlApplicationContext(false, "assembly://Oragon.Spring.Core.Tests/Oragon.Spring.Context.Support/contextB.xml", "assembly://Oragon.Spring.Core.Tests/Oragon.Spring.Context.Support/contextC.xml", "assembly://Oragon.Spring.Core.Tests/Oragon.Spring.Context.Support/contextA.xml"); Assert.IsTrue(ctx.ContainsObject("service")); Assert.IsTrue(ctx.ContainsObject("logicOne")); Assert.IsTrue(ctx.ContainsObject("logicTwo")); Service service = (Service)ctx.GetObject("service"); ctx.Refresh(); Assert.IsTrue(service.ProperlyDestroyed); service = (Service)ctx.GetObject("service"); ctx.Dispose(); Assert.IsTrue(service.ProperlyDestroyed); }