public ActionResult AddNewCandidate(CandidateMV candiate, int[] skills) { var createNew = new CandidateModel() { FirstName = candiate.FirstName, LastName = candiate.LastName }; var result = crsService.CreateNewCandidate(skills, createNew); return(RedirectToAction("Index")); }
public void AddNewCandidate() { var controller = new HomeController(crmService.Object); var input = new CandidateMV() { FirstName = "aa", LastName = "cc" }; int[] f = { 1, 2 }; var result = controller.AddNewCandidate(input, f) as RedirectToRouteResult; var resul = result.RouteValues; Assert.IsNotNull(result); Assert.AreEqual(1, resul.Count); }