Ejemplo n.º 1
0
 public virtual void TestRegistryRetrieval()
 {
     CodeResolverRegistry.RegisterCodeResolverRegistryForVersion(SpecificationVersion.R02_04_02, registry1);
     CodeResolverRegistry.RegisterCodeResolverRegistryForVersion(SpecificationVersion.R02_04_03, registry2);
     CodeResolverRegistry.RegisterCodeResolverRegistryForVersion(SpecificationVersion.R02_04_03_AB, registry3);
     CodeResolverRegistry.SetThreadLocalVersion(SpecificationVersion.R02_04_02);
     NUnit.Framework.Assert.AreEqual(registry1, CodeResolverRegistry.GetRegistry());
     CodeResolverRegistry.SetThreadLocalVersion(SpecificationVersion.R02_04_03);
     NUnit.Framework.Assert.AreEqual(registry2, CodeResolverRegistry.GetRegistry());
     CodeResolverRegistry.SetThreadLocalVersion(SpecificationVersion.R02_04_03_AB);
     NUnit.Framework.Assert.AreEqual(registry3, CodeResolverRegistry.GetRegistry());
     CodeResolverRegistry.ClearThreadLocalVersion();
     NUnit.Framework.Assert.AreEqual(CodeResolverRegistry.GetDefaultRegistry(), CodeResolverRegistry.GetRegistry());
 }
Ejemplo n.º 2
0
 public virtual void Teardown()
 {
     CodeResolverRegistry.ClearThreadLocalVersion();
     CodeResolverRegistry.RemoveAllRegistries();
     CodeResolverRegistry.UnregisterAll();
 }