public void FullNameTypeLookup() { var type = new MemberTypeReference(new SimpleTypeReference("System"), new Identifier("Math")); var result = type.Resolve(_compilationUnit.GetScope()); Assert.IsInstanceOfType(result, typeof(MemberResolveResult)); Assert.IsInstanceOfType(result.ScopeProvider, typeof(TypeDefinition)); Assert.AreEqual("System.Math", ((TypeDefinition)result.ScopeProvider).FullName); }
public void NestedTypeLookupThroughUsing() { _compilationUnit.UsingDirectives.Add(new UsingNamespaceDirective("System")); var type = new MemberTypeReference(new SimpleTypeReference("Environment"), new Identifier("SpecialFolder")); var result = type.Resolve(_compilationUnit.GetScope()); Assert.IsInstanceOfType(result, typeof(MemberResolveResult)); Assert.IsInstanceOfType(result.ScopeProvider, typeof(TypeDefinition)); Assert.AreEqual("System.Environment+SpecialFolder", ((TypeDefinition)result.ScopeProvider).FullName); }