コード例 #1
0
        public void AddCategory()
        {
            var db = new ProcedureDatabase();
            var id = db.Categories.Max(o => o.CategoryID) + 1;

            db.AddCategory(id, "Name" + id, "Description" + id);
        }
コード例 #2
0
        public void AddCategory()
        {
            var db    = new ProcedureDatabase();
            var count = db.Categories.Count();
            var id    = db.Categories.Max(o => o.CategoryID) + 1;

            db.AddCategory(id, "Name", "Description");
            Assert.AreEqual(count + 1, db.Categories.Count());
        }
コード例 #3
0
        public void AddCategory()
        {
            var db = new ProcedureDatabase {
                Log = Console.Out
            };
            var count = db.Categories.Count();

            db.AddCategory("name", "description");
            Assert.AreEqual(count + 1, db.Categories.Count());
        }