Exemple #1
0
 public virtual void TestRegistryRemoval()
 {
     CodeResolverRegistry.RegisterCodeResolverRegistryForVersion(SpecificationVersion.R02_04_02, registry1);
     CodeResolverRegistry.RegisterCodeResolverRegistryForVersion(SpecificationVersion.R02_04_03, registry2);
     CodeResolverRegistry.RegisterCodeResolverRegistryForVersion(SpecificationVersion.R02_04_03_AB, registry3);
     NUnit.Framework.Assert.AreEqual(registry1, CodeResolverRegistry.GetCodeResolverRegistryForVersion(SpecificationVersion.R02_04_02));
     NUnit.Framework.Assert.AreEqual(registry2, CodeResolverRegistry.GetCodeResolverRegistryForVersion(SpecificationVersion.R02_04_03));
     NUnit.Framework.Assert.AreEqual(registry3, CodeResolverRegistry.GetCodeResolverRegistryForVersion(SpecificationVersion.R02_04_03_AB));
     CodeResolverRegistry.RegisterCodeResolverRegistryForVersion(SpecificationVersion.R02_04_02, null);
     NUnit.Framework.Assert.IsNull(CodeResolverRegistry.GetCodeResolverRegistryForVersion(SpecificationVersion.R02_04_02));
     CodeResolverRegistry.RemoveAllRegistries();
     NUnit.Framework.Assert.IsNull(CodeResolverRegistry.GetCodeResolverRegistryForVersion(SpecificationVersion.R02_04_02));
     NUnit.Framework.Assert.IsNull(CodeResolverRegistry.GetCodeResolverRegistryForVersion(SpecificationVersion.R02_04_03));
     NUnit.Framework.Assert.IsNull(CodeResolverRegistry.GetCodeResolverRegistryForVersion(SpecificationVersion.R02_04_03_AB));
 }
Exemple #2
0
 public virtual void Teardown()
 {
     CodeResolverRegistry.ClearThreadLocalVersion();
     CodeResolverRegistry.RemoveAllRegistries();
     CodeResolverRegistry.UnregisterAll();
 }