示例#1
0
        public void CreateToDoList_Should_Create_ToDoList()
        {
            var connection = Effort.DbConnectionFactory.CreateTransient();
            using (var ctx = new MiniArchDatabaseContext(connection))
            {
                //write the list
                var service = new ListService(ctx);
                service.CreateToDoList(new TodoListModel()
                {
                    Name = "test list"
                });

                //get the list

                var todoLists = ctx.TodoLists.ToList();
                Assert.AreEqual(todoLists.Count, 1);
                Assert.AreEqual(todoLists[0].Name, "test list");

            }
        }