예제 #1
0
        public void ConvertsNullToInt()
        {
            var converter = new DotNetConverter<int>();

            var actual = converter.Convert(null);

            Assert.Equal(0, actual);
        }
예제 #2
0
        public void ConvertsStringNullToNull()
        {
            var converter = new DotNetConverter<string>();

            var actual = converter.Convert(null);

            Assert.Null(actual);
        }
예제 #3
0
        public void ConvertsIntToString()
        {
            var converter = new DotNetConverter<string>();

            var actual = converter.Convert(1);

            Assert.Equal("1", actual);
        }
예제 #4
0
        public void ConvertsStringDbNullToNull()
        {
            var converter = new DotNetConverter<string>();

            var actual = converter.Convert(DBNull.Value);

            Assert.Null(actual);
        }
예제 #5
0
        public void ConvertsIntDbNullToZero()
        {
            var converter = new DotNetConverter<int>();

            var actual = converter.Convert(DBNull.Value);

            Assert.Equal(0, actual);
        }
예제 #6
0
        public void ConvertsNullToInt()
        {
            var converter = new DotNetConverter <int>();

            var actual = converter.Convert(null);

            Assert.Equal(0, actual);
        }
예제 #7
0
        public void ConvertsIntToString()
        {
            var converter = new DotNetConverter <string>();

            var actual = converter.Convert(1);

            Assert.Equal("1", actual);
        }
예제 #8
0
        public void ConvertsStringNullToNull()
        {
            var converter = new DotNetConverter <string>();

            var actual = converter.Convert(null);

            Assert.Null(actual);
        }
예제 #9
0
        public void ConvertsIntDbNullToZero()
        {
            var converter = new DotNetConverter <int>();

            var actual = converter.Convert(DBNull.Value);

            Assert.Equal(0, actual);
        }
예제 #10
0
        public void ConvertsStringDbNullToNull()
        {
            var converter = new DotNetConverter <string>();

            var actual = converter.Convert(DBNull.Value);

            Assert.Null(actual);
        }