public void Store() { TodoRepository repository = new TodoRepository(); TodoModel todoA = new TodoModel(DefaultEntityIdentifier <TodoModel> .CreateNewInstance(), "aaa"); repository.Store(todoA); var list1 = repository.AsEntitiesList(); TodoModel todoB = new TodoModel(DefaultEntityIdentifier <TodoModel> .CreateNewInstance(), "bbb"); repository.Store(todoB); var list2 = repository.AsEntitiesList(); Assert.AreEqual(1, list1.Count); Assert.AreEqual("aaa", list1[0].Message()); Assert.AreEqual(2, list2.Count); Assert.AreEqual("bbb", list2[1].Message()); }
public TodoList GetAll() { return(repository.AsEntitiesList()); }