public void ParseSectionWithEmptyType()
        {
            const string xml = @"<?xml version='1.0' encoding='UTF-8' ?>
<parsers>
	<parser namespace='http://schemas.springframework.net/3' type='' schemaLocation='assembly://Oragon.Spring.Core.Tests/Oragon.Spring.Context.Support/testobject.xsd'/>
</parsers>";

            NamespaceParsersSectionHandler handler = new NamespaceParsersSectionHandler();

            Assert.Throws <ArgumentNullException>(() => handler.Create(null, null, BuildConfigurationSection(xml)));
        }
        public void ParseSectionSunnyDay()
        {
            const string xml = @"<?xml version='1.0' encoding='UTF-8' ?>
<parsers>
	<parser namespace='http://schemas.springframework.net/testobject' type='Oragon.Spring.Context.Support.TestObjectConfigParser, Oragon.Spring.Core.Tests' schemaLocation='assembly://Oragon.Spring.Core.Tests/Oragon.Spring.Context.Support/testobject.xsd'/>
</parsers>";

            NamespaceParsersSectionHandler handler = new NamespaceParsersSectionHandler();

            handler.Create(null, null, BuildConfigurationSection(xml));
        }
        public void ParseSectionWithNoChildParserNamespaceElements()
        {
            const string xml = @"<?xml version='1.0' encoding='UTF-8' ?>
<parsers>
	<!-- now't in here -->
</parsers>";

            NamespaceParsersSectionHandler handler = new NamespaceParsersSectionHandler();

            handler.Create(null, null, BuildConfigurationSection(xml));
        }
        public void WithParserElementThatIsMissingTheTypeAttribute()
        {
            const string xml = @"<?xml version='1.0' encoding='UTF-8' ?>
<parsers>
	<parser namespace='http://schemas.springframework.net/3'/>
</parsers>";

            NamespaceParsersSectionHandler handler = new NamespaceParsersSectionHandler();

            Assert.Throws <ConfigurationErrorsException>(() => handler.Create(null, null, BuildConfigurationSection(xml)));
        }