Exemplo 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);
        }
Exemplo 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);
        }