Beispiel #1
0
        public void TestTaskToCompleteViewModelAddThreeTasks()
        {
            TaskToCompleteListViewModel viewModel = new TaskToCompleteListViewModel();

            viewModel.AddTaskToComplete();
            viewModel.AddTaskToComplete();
            viewModel.AddTaskToComplete();

            Assert.AreEqual(viewModel.TaskToCompleteList.Count, 3);
        }
Beispiel #2
0
        public void TestTaskToCompleteViewModelAddTaskWithDescription()
        {
            TaskToCompleteListViewModel viewModel = new TaskToCompleteListViewModel();

            viewModel.AddTaskToComplete(Constants.DefaultTaskDescription);

            Assert.AreEqual(viewModel.TaskToCompleteList.Count, 1);
            Assert.AreEqual(viewModel.TaskToCompleteList[0].TaskDescription, Constants.DefaultTaskDescription);
        }
Beispiel #3
0
        public void TestTaskToCompleteViewModelAddTaskToComplete()
        {
            TaskToCompleteListViewModel viewModel = new TaskToCompleteListViewModel();
            string newTaskDescription             = "hey I've been changed";

            viewModel.NewTaskDescription = newTaskDescription;

            viewModel.AddTaskToComplete();

            Assert.AreEqual(viewModel.TaskToCompleteList.Count, 1);
            Assert.AreEqual(viewModel.TaskToCompleteList[0].TaskDescription, newTaskDescription);
            Assert.AreEqual(viewModel.NewTaskDescription, Constants.DefaultTaskDescription);
        }