public Task CreateTask(string description) { description.ThrowIfNullOrEmpty(); var task = new Task(description, this); Tasks.Add(task); return task; }
public void GivenValidUserAndDescriptionThenDescriptionSetCorrectly() { // Arrange. var validDescription = "Pick up milk."; var validUser = new User("*****@*****.**"); // Act. var task = new Task(validDescription, validUser); // Assert. Assert.AreEqual(validDescription, task.Description); }