Exemple #1
0
        public FakeStorage()
        {
            listItems = new Dictionary <int, ListItemEntity>();
            var newItem = new ListItemEntity()
            {
                Id     = lastMaxId++,
                Name   = "test",
                IsDone = false
            };

            listItems.Add(newItem.Id, newItem);
        }
Exemple #2
0
        public ListItem SaveListItem(string listItemName)
        {
            var newItem = new ListItemEntity
            {
                Id     = lastMaxId++,
                Name   = listItemName,
                IsDone = false
            };

            listItems.Add(newItem.Id, newItem);

            return(new ListItem()
            {
                Id = newItem.Id,
                Name = newItem.Name
            });
        }