Esempio n. 1
0
        public void RowConverter_HandlesValue_Correctly()
        {
            var columns = new List<Column>() {
                new Column("Value")
            };
            var row = new Row(new List<object>() { "|" });

            var converter = new RowConverter();

            Assert.AreEqual('|', converter.ConvertRowToObject<NullableTestModel>(columns, row).Value);
        }
Esempio n. 2
0
        public void RowConverter_HandlesDBNull_WithoutCrashing()
        {
            var columns = new List<Column>() {
                new Column("Value")
            };
            var row = new Row(new List<object>() { DBNull.Value });

            var converter = new RowConverter();

            Assert.AreEqual(null, converter.ConvertRowToObject<NullableTestModel>(columns, row).Value);
        }
Esempio n. 3
0
        public void RowConverter_HandlesValue_Correctly()
        {
            var columns = new List <Column>()
            {
                new Column("Value")
            };
            var row = new Row(new List <object>()
            {
                "|"
            });

            var converter = new RowConverter();

            Assert.AreEqual('|', converter.ConvertRowToObject <NullableTestModel>(columns, row).Value);
        }
Esempio n. 4
0
        public void RowConverter_HandlesDBNull_WithoutCrashing()
        {
            var columns = new List <Column>()
            {
                new Column("Value")
            };
            var row = new Row(new List <object>()
            {
                DBNull.Value
            });

            var converter = new RowConverter();

            Assert.AreEqual(null, converter.ConvertRowToObject <NullableTestModel>(columns, row).Value);
        }