Exemple #1
0
        public void TestCreateNewTaskMethod()
        {
            string time        = "10:10:10";
            string title       = "newTitle";
            string subtitle    = "newSubtitle";
            string description = "newDescription";
            string status      = "newStatus";
            int    priority    = 1;

            Mock <Task> mockTask = new Mock <Task>();

            mockTask.Object.Time        = time;
            mockTask.Object.Title       = title;
            mockTask.Object.Subtitle    = subtitle;
            mockTask.Object.Description = description;
            mockTask.Object.Status      = status;
            mockTask.Object.Priority    = priority;

            Task realTask = _persistance.CreateNewTask(time, title, subtitle, description, status, priority);

            Assert.AreEqual(mockTask.Object.Title, realTask.Title);
            Assert.AreEqual(mockTask.Object.Subtitle, realTask.Subtitle);
            Assert.AreEqual(mockTask.Object.Description, realTask.Description);
            Assert.AreEqual(mockTask.Object.Status, realTask.Status);
            Assert.AreEqual(mockTask.Object.Priority, realTask.Priority);
        }
Exemple #2
0
 /// <summary>
 ///  Halip Vasile Emanuel
 ///  Call the method from the persistance layer.
 ///  Create a new Task.
 /// </summary>
 /// <param name="task"></param>
 public void CreateNewTask(Task task, string selectedDate)
 {
     _persistance.CreateNewTask(task, selectedDate);
 }