示例#1
0
        public Task CreateTask(string description)
        {
            description.ThrowIfNullOrEmpty();

            var task = new Task(description, this);
            Tasks.Add(task);

            return task;
        }
示例#2
0
        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);
        }