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

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

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

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