public void GetTypeName_RefGenericParameter() { var target = new VisualBasicTypeNameProvider(); var actual = target.GetTypeName(typeof(ISample).GetMethod("MethodWithGenericRefParameter").GetParameters().First().ParameterType); actual.Should().Be("IEnumerable(Of Integer)"); }
public void GetTypeName_OutBooleanParameter() { var target = new VisualBasicTypeNameProvider(); var actual = target.GetTypeName(typeof(ISample).GetMethod("MethodWithOutBooleanParameter").GetParameters().First().ParameterType); actual.Should().Be("Boolean"); }
public void GetTypeName_RefSimpleParameter() { var target = new VisualBasicTypeNameProvider(); var actual = target.GetTypeName(typeof(ISample).GetMethod("MethodWithSimpleRefParameter").GetParameters().First().ParameterType); actual.Should().Be("SampleClass"); }
public void GetTypeName_PointerSimpleParameter() { var target = new VisualBasicTypeNameProvider(); var actual = target.GetTypeName(typeof(char *)); actual.Should().Be("Char"); }
public void GetTypeName_JaggedArrayOfPrimitives() { var target = new VisualBasicTypeNameProvider(); var actual = target.GetTypeName(typeof(int[][])); actual.Should().Be("Integer()()"); }
public void GetTypeName_JaggedArrayOfGenericTypes() { var target = new VisualBasicTypeNameProvider(); var actual = target.GetTypeName(typeof(IEnumerable <double>[][])); actual.Should().Be("IEnumerable(Of Double)()()"); }
public void GetTypeName_RefType() { var target = new VisualBasicTypeNameProvider(); var actual = target.GetTypeName(typeof(SampleClass)); actual.Should().Be("SampleClass"); }
public void GetTypeName_MultidimensionalArrayOfRefTypes() { var target = new VisualBasicTypeNameProvider(); var actual = target.GetTypeName(typeof(SampleClass[, , ])); actual.Should().Be("SampleClass(,,)"); }
public void GetTypeName_Char() { var target = new VisualBasicTypeNameProvider(); var actual = target.GetTypeName(typeof(char)); actual.Should().Be("Char"); }
public void GetTypeName_NullableLong() { var target = new VisualBasicTypeNameProvider(); var actual = target.GetTypeName(typeof(long?)); actual.Should().Be("Long?"); }
public void GetTypeName_NullableInt() { var target = new VisualBasicTypeNameProvider(); var actual = target.GetTypeName(typeof(int?)); actual.Should().Be("Integer?"); }
public void GetTypeName_NullableShort() { var target = new VisualBasicTypeNameProvider(); var actual = target.GetTypeName(typeof(short?)); actual.Should().Be("Short?"); }
public void GetTypeName_NullableDouble() { var target = new VisualBasicTypeNameProvider(); var actual = target.GetTypeName(typeof(double?)); actual.Should().Be("Double?"); }
public void GetTypeName_Bool() { var target = new VisualBasicTypeNameProvider(); var actual = target.GetTypeName(typeof(bool)); actual.Should().Be("Boolean"); }
public void GetTypeName_NullableValueType() { var target = new VisualBasicTypeNameProvider(); var actual = target.GetTypeName(typeof(SampleStruct?)); actual.Should().Be("SampleStruct?"); }
public void GetTypeName_MultidimensionalArrayOfPrimitives() { var target = new VisualBasicTypeNameProvider(); var actual = target.GetTypeName(typeof(int[, ])); actual.Should().Be("Integer(,)"); }
public void GetTypeName_GenericTypeWithMultipleParameters() { var target = new VisualBasicTypeNameProvider(); var actual = target.GetTypeName(typeof(Dictionary <string, double>)); actual.Should().Be("Dictionary(Of String, Of Double)"); }
public void GetTypeName_MultidimensionalArrayOfGenericTypes() { var target = new VisualBasicTypeNameProvider(); var actual = target.GetTypeName(typeof(IEnumerable <double> [, , ])); actual.Should().Be("IEnumerable(Of Double)(,,)"); }
public void GetTypeName_GenericTypeOfGenericType() { var target = new VisualBasicTypeNameProvider(); var actual = target.GetTypeName(typeof(List <IEnumerable <int> >)); actual.Should().Be("List(Of IEnumerable(Of Integer))"); }
public void GetTypeName_Float() { var target = new VisualBasicTypeNameProvider(); var actual = target.GetTypeName(typeof(float)); actual.Should().Be("Single"); }
public void GetTypeName_ArrayOfGenericTypes() { var target = new VisualBasicTypeNameProvider(); var actual = target.GetTypeName(typeof(List <int>[])); actual.Should().Be("List(Of Integer)()"); }
public void GetTypeName_ULong() { var target = new VisualBasicTypeNameProvider(); var actual = target.GetTypeName(typeof(ulong)); actual.Should().Be("ULong"); }
public void GetTypeName_Object() { var target = new VisualBasicTypeNameProvider(); var actual = target.GetTypeName(typeof(object)); actual.Should().Be("Object"); }
public void GetTypeName_UShort() { var target = new VisualBasicTypeNameProvider(); var actual = target.GetTypeName(typeof(ushort)); actual.Should().Be("UShort"); }
public void GetTypeName_UInt() { var target = new VisualBasicTypeNameProvider(); var actual = target.GetTypeName(typeof(uint)); actual.Should().Be("UInteger"); }
public void GetTypeName_Byte() { var target = new VisualBasicTypeNameProvider(); var actual = target.GetTypeName(typeof(byte)); actual.Should().Be("Byte"); }
public void GetTypeName_Decimal() { var target = new VisualBasicTypeNameProvider(); var actual = target.GetTypeName(typeof(decimal)); actual.Should().Be("Decimal"); }
public void IncludeNamespace_WithGenericType() { var target = new VisualBasicTypeNameProvider() { IncludeNamespace = true }; var actual = target.GetTypeName(typeof(List <int>)); actual.Should().Be("System.Collections.Generic.List(Of Integer)"); }
public void IncludeNamespace_IsSet_IgnoreForAlias() { var target = new VisualBasicTypeNameProvider(); target.IncludeNamespace = true; var str = target.GetTypeName(typeof(int)); str.Should().Be("Integer"); }
public void IncludeNamespace_IsSet_Works() { var target = new VisualBasicTypeNameProvider(); target.IncludeNamespace = true; var actualType = this.GetType(); var str = target.GetTypeName(actualType); str.Should().Be(actualType.Namespace + "." + actualType.Name); }