예제 #1
0
        public static void TestCanCount()
        {
            var repository = new ModelRepository();

            repository.DeleteAll();
            repository.Insert(getModels());

            var count = repository.CountAll();

            Assert.True(count == getModels().Count(), "Incorrect count");
        }
예제 #2
0
        public static void TestCanCount()
        {
            var repository = new ModelRepository ();

            repository.DeleteAll ();
            repository.Insert (getModels ());

            var count = repository.CountAll ();

            Assert.True (count == getModels ().Count (), "Incorrect count");
        }
예제 #3
0
        public static void TestCanDeleteAll()
        {
            var repository = new ModelRepository();

            repository.Insert(getModels());

            var preCount = repository.CountAll();

            repository.DeleteAll();

            var postCount = repository.CountAll();

            Assert.True(preCount > 0, "No records were available to delete");
            Assert.True(postCount == 0, "Failed to delete all records");
        }
예제 #4
0
        public static void TestCanDeleteAll()
        {
            var repository = new ModelRepository ();

            repository.Insert (getModels ());

            var preCount = repository.CountAll ();

            repository.DeleteAll ();

            var postCount = repository.CountAll ();

            Assert.True (preCount > 0, "No records were available to delete");
            Assert.True (postCount == 0, "Failed to delete all records");
        }