public void ConvertToStringTest() { var converter = new ByteConverter(); Assert.Equal( "123", converter.ConvertToString( (byte)123 ) ); Assert.Equal( "", converter.ConvertToString( null ) ); }
public void ConvertToStringTest() { var converter = new ByteConverter(); Assert.AreEqual( "123", converter.ConvertToString( CultureInfo.CurrentCulture, (byte)123 ) ); Assert.AreEqual( "", converter.ConvertToString( CultureInfo.CurrentCulture, null ) ); }
public void ConvertToStringTest() { var converter = new ByteConverter(); var typeConverterOptions = new TypeConverterOptions { CultureInfo = CultureInfo.CurrentCulture }; Assert.AreEqual( "123", converter.ConvertToString( typeConverterOptions, (byte)123 ) ); Assert.AreEqual( "", converter.ConvertToString( typeConverterOptions, null ) ); }
public void ConvertToStringTest() { var converter = new ByteConverter(); var propertyMapData = new CsvPropertyMapData( null ) { TypeConverter = converter, TypeConverterOptions = { CultureInfo = CultureInfo.CurrentCulture } }; Assert.AreEqual( "123", converter.ConvertToString( (byte)123, null, propertyMapData ) ); Assert.AreEqual( "", converter.ConvertToString( null, null, propertyMapData ) ); }