Ejemplo n.º 1
0
        public void StructuredDynamicYielder()
        {
            var result = new StructuredDynamicYielder(new[] { new {
                                                                  A = (long)1,
                                                                  B = (long?)2,
                                                                  C = Col.BigInt(3),
                                                                  D = (long?)null,
                                                                  E = Col.BigInt(null)
                                                              } }).First();

            Assert.AreEqual(5, result.FieldCount);
            Assert.AreEqual(typeof(long), result.GetValue(0).GetType());
            Assert.AreEqual(1, result.GetValue(0));
            Assert.AreEqual(typeof(long), result.GetValue(1).GetType());
            Assert.AreEqual(2, result.GetValue(1));
            Assert.AreEqual(typeof(long), result.GetValue(2).GetType());
            Assert.AreEqual(3, result.GetValue(2));
            Assert.AreEqual(DBNull.Value, result.GetValue(3));
            Assert.AreEqual(DBNull.Value, result.GetValue(4));
        }
Ejemplo n.º 2
0
 public void Factory()
 {
     Assert.IsInstanceOf <SqlBigInt>(Col.BigInt(5));
 }