public void AddAssemblyAlias_Test() { DomainTypeResolver resolver = new DomainTypeResolver(true); resolver.AddAssemblyAlias("test", "Moonlit.TestFixtures, Version=1.0.0.0, Culture=neutral"); Assert.AreEqual(typeof(DemoClass), resolver.ResolveType("Moonlit.TestFixtures.DemoClass, test")); }
public void AddAssemblyAlias_Test() { DomainTypeResolver resolver = new DomainTypeResolver(true); resolver.AddAssemblyAlias("test", "Moonlit.TestFixtures, Version=1.0.0.0, Culture=neutral"); Assert.AreEqual(typeof(DemoClass), resolver.ResolveType("Moonlit.TestFixtures.DemoClass, test")); }
public void AddTypeAlias_Test() { DomainTypeResolver resolver = new DomainTypeResolver(false); DomainTypeResolver ignoreCaseResolver = new DomainTypeResolver(true); resolver.AddAssemblyAlias("test", "Moonlit.TestFixtures, Version=1.0.0.0, Culture=neutral"); resolver.AddTypeAlias("int", typeof(Int32)); Assert.AreEqual(typeof(Int32), ignoreCaseResolver.ResolveType("int")); Assert.AreEqual(typeof(Int32), ignoreCaseResolver.ResolveType("Int")); Assert.IsNull(resolver.ResolveType("Int")); }
public void AddTypeAlias_Test() { DomainTypeResolver resolver = new DomainTypeResolver(false); DomainTypeResolver ignoreCaseResolver = new DomainTypeResolver(true); resolver.AddAssemblyAlias("test", "Moonlit.TestFixtures, Version=1.0.0.0, Culture=neutral"); resolver.AddTypeAlias("int", typeof(Int32)); Assert.AreEqual(typeof(Int32), ignoreCaseResolver.ResolveType("int")); Assert.AreEqual(typeof(Int32), ignoreCaseResolver.ResolveType("Int")); Assert.IsNull(resolver.ResolveType("Int")); }