I have following in my controller file:
public ActionResult Index()
{
var model = new ClientGroupIndexViewModel()
{
AddScanUrl = Url.RouteUrl<ClientGroupsController>(c => c.CreateNewScan(null, null)),
//other similar stuff
};
return View("ClientGroupsIndex", model);
}
public JsonResult CreateNewScan(ClientGroup clientGroup, Version version)
{
//do something
return Json(new{Message = "created new scan", Success = true});
}
I've to write Unit test case for CreateNewScan. How can this be done (preferably using built-in testing framework in VS)? Any pointers in this regard appreciated.