Esempio n. 1
0
        public void ConvertToStringTest()
        {
            var converter = new ByteConverter();

            Assert.Equal( "123", converter.ConvertToString( (byte)123 ) );

            Assert.Equal( "", converter.ConvertToString( null ) );
        }
Esempio n. 2
0
        public void ConvertToStringTest()
        {
            var converter = new ByteConverter();

            Assert.AreEqual( "123", converter.ConvertToString( CultureInfo.CurrentCulture, (byte)123 ) );

            Assert.AreEqual( "", converter.ConvertToString( CultureInfo.CurrentCulture, null ) );
        }
Esempio n. 3
0
        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 ) );
        }
Esempio n. 4
0
        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 ) );
        }