public void should_return_registered_context_with_ContextRegistry()
        {
			const string xmlData =
				@"<context type='Spring.Context.Support.XmlApplicationContext, Spring.Core'>
	                <resource uri='assembly://Spring.Web.Tests/Spring.Context.Support/WebContextHandlerTests.xml'/>
                 </context>";
            GenericApplicationContext expectedContext = new GenericApplicationContext(null, false, null);
            ContextRegistry.RegisterContext(expectedContext);
            WebContextHandler webContextHandler = new WebContextHandler();
            
            Object actualContext = webContextHandler.Create(null, null, CreateConfigurationElement(xmlData));

            Assert.AreSame(expectedContext, actualContext);
        }
Beispiel #2
0
        public void should_return_registered_context_with_ContextRegistry()
        {
            const string xmlData =
                @"<context type='Spring.Context.Support.XmlApplicationContext, Spring.Core'>
	                <resource uri='assembly://Spring.Web.Tests/Spring.Context.Support/WebContextHandlerTests.xml'/>
                 </context>";
            GenericApplicationContext expectedContext = new GenericApplicationContext(null, false, null);

            ContextRegistry.RegisterContext(expectedContext);
            WebContextHandler webContextHandler = new WebContextHandler();

            Object actualContext = webContextHandler.Create(null, null, CreateConfigurationElement(xmlData));

            Assert.AreSame(expectedContext, actualContext);
        }