Husam Al-Masri

Husam Al-Masri

  • NA
  • 7
  • 706

how can i create unit test for this code?

Mar 8 2018 6:31 AM
i have a task and i must finish it .. still to me unit test please any one can help me to build unit test for this short code ?
public ActionResult Create([Bind(Include = "ID,NAME,DESCRIPTION")] TODO tODO , TODO_MIRROR tODO_MIRROR)
{
if (ModelState.IsValid)
{
db.TODOS.Add(tODO);
db.TODO_MIRRORS.Add(tODO_MIRROR);
db.SaveChanges();
return RedirectToAction("Index");
}
return View(tODO);
}

Answers (2)