Register ContextNamespaceParser as well known parser in NamespaceParserRegistry

This commit is contained in:
Thomas Trageser
2013-03-22 19:52:05 +00:00
parent fc22f0253d
commit 0ded0d93e4
8 changed files with 2 additions and 9 deletions

View File

@@ -93,6 +93,7 @@ namespace Spring.Objects.Factory.Xml
wellknownNamespaceParserTypeNames = new CaseInsensitiveHashtable();
wellknownNamespaceParserTypeNames["http://www.springframework.net/tx"] = "Spring.Transaction.Config.TxNamespaceParser, Spring.Data";
wellknownNamespaceParserTypeNames["http://www.springframework.net/aop"] = "Spring.Aop.Config.AopNamespaceParser, Spring.Aop";
wellknownNamespaceParserTypeNames["http://www.springframework.net/context"] = "Spring.Context.Config.ContextNamespaceParser, Spring.Core";
wellknownNamespaceParserTypeNames["http://www.springframework.net/db"] = "Spring.Data.Config.DatabaseNamespaceParser, Spring.Data";
wellknownNamespaceParserTypeNames["http://www.springframework.net/database"] = "Spring.Data.Config.DatabaseNamespaceParser, Spring.Data";
wellknownNamespaceParserTypeNames["http://www.springframework.net/remoting"] = "Spring.Remoting.Config.RemotingNamespaceParser, Spring.Services";

View File

@@ -30,9 +30,7 @@ namespace Spring.Context.Attributes
{
protected override void CreateApplicationContext()
{
NamespaceParserRegistry.RegisterParser(typeof(ContextNamespaceParser));
_ctx = new XmlApplicationContext(ReadOnlyXmlTestResource.GetFilePath("SimpleScanTest.xml", GetType()));
}
[Test]

View File

@@ -38,7 +38,6 @@ namespace Spring.Context.Attributes
[SetUp]
public void Setup()
{
NamespaceParserRegistry.RegisterParser(typeof(ContextNamespaceParser));
_applicationContext = new XmlApplicationContext(ReadOnlyXmlTestResource.GetFilePath("SimpleScanTest.xml", GetType()));
}

View File

@@ -33,7 +33,6 @@ namespace Spring.Context.Config
[SetUp]
public void Setup()
{
NamespaceParserRegistry.RegisterParser(typeof(ContextNamespaceParser));
}
[Test]

View File

@@ -12,7 +12,6 @@ namespace Spring.Context.Config
[SetUp]
public void Setup()
{
NamespaceParserRegistry.RegisterParser(typeof(ContextNamespaceParser));
}
[Test]

View File

@@ -38,7 +38,6 @@ namespace Spring.Context.Config
[SetUp]
public void Setup()
{
NamespaceParserRegistry.RegisterParser(typeof(ContextNamespaceParser));
}
[Test]

View File

@@ -38,7 +38,6 @@ namespace Spring.Context.Config
[SetUp]
public void Setup()
{
NamespaceParserRegistry.RegisterParser(typeof(ContextNamespaceParser));
}
[Test]

View File

@@ -30,11 +30,10 @@ namespace Spring.Context.Config
[SetUp]
public void Setup()
{
NamespaceParserRegistry.RegisterParser(typeof(ContextNamespaceParser));
}
[Test]
public void Registered()
public void RegisteredAsWellKnownParser()
{
Assert.IsNotNull(NamespaceParserRegistry.GetParser("http://www.springframework.net/context"));
}