Example #1
0
 public void DBNUll_Ok()
 {
     Assert.Equal(0, LgbConvert.ReadValue(DBNull.Value, 0));
 }
Example #2
0
        public void Object_Ok()
        {
            var v = new object();

            Assert.Equal("test", LgbConvert.ReadValue("test", v).ToString());
        }
Example #3
0
 public void Default_Ok(object source)
 {
     Assert.Equal(0, LgbConvert.ReadValue(source, 0));
 }
Example #4
0
        public void Nullable_Ok(string value, int?expect)
        {
            var v = expect;

            Assert.Equal(expect, LgbConvert.ReadValue(value, v));
        }
Example #5
0
 public void Enum_Ok(string value)
 {
     Assert.Equal(SocketError.AccessDenied, LgbConvert.ReadValue(value, SocketError.AccessDenied));
 }
Example #6
0
        public void Class_Ok()
        {
            var v = new Foo();

            Assert.Equal(v, LgbConvert.ReadValue("Test", v));
        }
Example #7
0
 public void Convert_Ok(string value, int v)
 {
     Assert.Equal(v, LgbConvert.ReadValue(value, v));
 }