public void AddCategory() { var db = new ProcedureDatabase(); var id = db.Categories.Max(o => o.CategoryID) + 1; db.AddCategory(id, "Name" + id, "Description" + id); }
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()); }
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()); }