Пример #1
0
        public void CreateTask_DescriptionWithALink_SetLink()
        {
            var input = "test http://www.google.com";

            var task = new TaskList.Controllers.Task(input, default(DateTime), new IgnoreLinkValidator());

            Expect(task.Link, Is.EqualTo("http://www.google.com"));
        }
Пример #2
0
 public ActionResult Add(string task)
 {
     var taskItem = new Task(task, DateTime.Today, new LinkValidator());
     Tasks.Add(taskItem);
     return RedirectToAction("Index");
 }