Forums - C# Corner

Forum guidelines
Husam Al-Masri

Husam Al-Masri

  • 1.7k
  • 7
  • 174

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)