public void GetSafeTypeName_BuiltinTypeGiven_ShouldReturnShortenRepresentation() { var type = typeof(int); var result = CSharpSourceCodeGeneration.GetSafeTypeName(type); result.Should().Be("int"); }
public void GetSafeTypeName_ArrayGiven_ShouldReturnArrayType() { var type = typeof(SampleClass[]); var result = CSharpSourceCodeGeneration.GetSafeTypeName(type); result.Should().Be("SampleClass[]"); }
public void GetSafeTypeName_GenericGiven_ShouldReturnCorrespondingGenericExpression() { var type = typeof(Action <SampleStruct>); var result = CSharpSourceCodeGeneration.GetSafeTypeName(type); result.Should().Be("Action<SampleStruct>"); }
public void GetSafeTypeName_ClassGiven_ShouldReturnClassName() { var type = typeof(SampleClass); var result = CSharpSourceCodeGeneration.GetSafeTypeName(type); result.Should().Be(type.Name); }