public void ResolveTypeReference_GenericDictionary_Works() { TypeReference reference = new TypeReference("Dictionary", new List<TypeReference>(new TypeReference[] { new TypeReference("string"), new TypeReference("DateTime") })); _typeResolver.UseNamespace("System"); _typeResolver.UseNamespace("System.Collections.Generic"); Assert.AreEqual("Dictionary<string,DateTime>", reference.ToString()); string actual = _typeResolver.Resolve(reference); }
public override string ToString() { return("[InnerClassTypeReference: (" + baseType.ToString() + ")." + base.ToString() + "]"); }
public void ResolveTypeReference_TwoDimArray_Works() { TypeReference reference = new TypeReference("DateTime", new int[] { 0, 0 }); _typeResolver.UseNamespace("System"); Assert.AreEqual("DateTime[][]", reference.ToString()); Assert.AreEqual("System.DateTime[][]", _typeResolver.Resolve(reference)); }
public void ResolveTypeReference_ArrayOfSourceType_Works() { TypeReference reference = new TypeReference("RadClass", new int[] { 0, 0 }); _typeResolver.AddTableEntry("SomeNamespace.Utility.RadClass"); _typeResolver.UseNamespace("System"); _typeResolver.UseNamespace("SomeNamespace.Utility"); Assert.AreEqual("RadClass[][]", reference.ToString()); Assert.AreEqual("SomeNamespace.Utility.RadClass[][]", _typeResolver.Resolve(reference)); }
public void ResolveTypeReference_SimplePrimitiveTypeArray_Works() { TypeReference reference = new TypeReference("long", new int[] { 0 }); _typeResolver.UseNamespace("System"); Assert.AreEqual("long[]", reference.ToString()); Assert.AreEqual("System.Int64[]", _typeResolver.Resolve(reference)); }
public void ResolveTypeReference_Simple_Works() { TypeReference reference = new TypeReference("DateTime"); _typeResolver.UseNamespace("System"); Assert.AreEqual("DateTime", reference.ToString()); Assert.AreEqual("System.DateTime", _typeResolver.Resolve(reference)); }
public override string ToString() { return(baseType.ToString() + "+" + base.ToString()); }
public void ResolveTypeReference_GenericList_Works() { var reference = new TypeReference("List", new List<TypeReference>(new[] {new TypeReference("string")})); typeResolver.UseNamespace("System"); typeResolver.UseNamespace("System.Collections.Generic"); Assert.AreEqual("List<string>", reference.ToString()); }
public void ResolveTypeReference_SimpleArray_Works() { var reference = new TypeReference("DateTime", new[] {0}); typeResolver.UseNamespace("System"); Assert.AreEqual("DateTime[]", reference.ToString()); Assert.AreEqual("System.DateTime[]", typeResolver.Resolve(reference)); }