Exemplo n.º 1
0
        public Task CreateTask(string description)
        {
            description.ThrowIfNullOrEmpty();

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

            return task;
        }
Exemplo n.º 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);
        }