public void InvalidCompleteShouldThrow() { var todo = new Todo("Something"); todo.Complete(); Assert.Throws <InvalidOperationException>(() => todo.Complete()); }
public async Task Complete(Todo todo) { await CheckAndConnect(); todo.Complete(); await Upsert(todo); }
public void CompletedStatusShouldReturn() { var todo = new Todo("Some task"); todo.Complete(); Assert.StartsWith("Completed", todo.Status); }
public void Complete() { Account account = new Account("test"); var todo = new Todo("foobar", account); todo.Complete(); Assert.NotNull(todo.CompletedDate); }
public async Task Complete(TodoId id) { Todo todo = await Finder.Find(id); todo.Complete(); await Repository.Update(todo); }
public void ShouldAssignCompletedTime() { var todo = new Todo("Something"); var before = DateTime.Now; todo.Complete(); var after = DateTime.Now; Assert.True(before <= todo.CompletedAt && todo.CompletedAt <= after); }
public void SaveTest() { ClearDb(); var item = new Todo("Something"); _repo.Add(item); item.Complete(); _repo.Save(item); Assert.True(_repo.Get(item.Id).IsDone); }