コード例 #1
0
        public void FetchAbsolute()
        {
            var row = AdminQuery.FetchAbsolute("c1", SqlExpression.Constant(5));

            Assert.IsNotNull(row);
            Assert.AreEqual(2, row.ColumnCount);

            var val1 = row.GetValue(0);
            var val2 = row.GetValue(1);

            Assert.IsNotNull(val1);
            Assert.IsNotNull(val2);

            Assert.IsInstanceOf <NumericType>(val1.Type);
            Assert.IsInstanceOf <StringType>(val2.Type);

            var id = ((SqlNumber)val1.Value).ToInt32();

            Assert.AreEqual(5, id);
        }