vendredi 5 juin 2015

Unit Test Crud using code first

Currently doing CRUD unit test with code first. Need some guidance. What else would need to go into the test method?

    //Test Class
    [TestMethod]
    public void Index()
    {
        var projectController = new projectController();
        ViewResult result = projectController.Index() as ViewResult;
        Assert.AreEqual("Index",result.ViewName);
    }

    //Controller
     public ActionResult Index()//Viewing of all projects
    {
        var obj = new ProjectBusiness();
        return View(obj.GetAllProjects());
    }

Aucun commentaire:

Enregistrer un commentaire