public void NullableSumTest()
        {
            SQLiteConnection db = new TestDb();

            db.CreateTable <NullableIntClass>();

            var r = db.ExecuteScalar <int>("SELECT SUM(NullableInt) FROM NullableIntClass WHERE 1 = 0");

            Assert.AreEqual(0, r);
        }
Beispiel #2
0
        public void CanUseSubtypeOfTableAttribute()
        {
            var db = new TestDb();

            db.CreateTable <Cat>();

            db.Insert(new Cat()
            {
                Breed = "Siamese"
            });

            int numCats = db.ExecuteScalar <int>("select count(*) from Cats");

            Assert.That(numCats, Is.EqualTo(1), "The resulting num cats should be 1.");
        }