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")); }
public ActionResult Add(string task) { var taskItem = new Task(task, DateTime.Today, new LinkValidator()); Tasks.Add(taskItem); return RedirectToAction("Index"); }