예제 #1
0
        public void CheckCreatorAndReader()
        {
            using (var context = PrepareContext())
            {
                CleanDatabase(context);
                var storageSaver = new DbStorage(context);
                var creator      = new ListItemCreator(storageSaver);

                creator.Add("a list item");

                var item = context.ToDoListItems.Single();
                Assert.False(item.IsDone);
                Assert.Equal("a list item", item.Name);
            }
        }
예제 #2
0
 private void Act(string listItemName)
 {
     listItemCreator.Add(listItemName);
 }