Exemple #1
0
 public void Run()
 {
     CodeResolverRegistry.SetThreadLocalVersion(this.version);
     try
     {
         Thread.Sleep(1000);
     }
     catch (Exception)
     {
     }
     this.passedTest = (CodeResolverRegistry.GetRegistry() == this.registry);
 }
Exemple #2
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());
 }