public void WhenSheSetsACategoryForTheTask() { var newCat = new Category(new Mock <IRepository <Category> >().Object); newCat.SetName("New Category"); _item.AddCategory(newCat); }
public void GivenJillHasATaskWithCategories(int count) { _item = new TaskItem(new Mock <IRepository <TaskItem> >().Object); _item.SetName("Task with categories"); if (count > 0) { var cat = new Category(new Mock <IRepository <Category> >().Object); cat.SetName("Category 1"); _item.AddCategory(cat); Assert.That(_item.Categories, Is.Not.Empty); } else { Assert.That(_item.Categories, Is.Null); } }