Exemplo n.º 1
0
        public void Test_MarkDone_MarkTaskAsDone()
        {
            DateTime date1    = new DateTime(2008, 4, 10);
            Task     testTask = new Task("Mow the lawn", date1);

            testTask.Save();
            testTask.MarkDone();
            Task actual = Task.GetAll()[0];

            Assert.Equal(true, actual.GetStatus());
        }
Exemplo n.º 2
0
 public override bool Equals(System.Object otherTask)
 {
     if (!(otherTask is Task))
     {
         return(false);
     }
     else
     {
         Task newTask             = (Task)otherTask;
         bool idEquality          = (this.GetId() == newTask.GetId());
         bool descriptionEquality = (this.GetDescription() == newTask.GetDescription());
         bool statusEquality      = (this.GetStatus() == newTask.GetStatus());
         return(idEquality && descriptionEquality && statusEquality);
     }
 }