vendredi 23 juin 2017

how to test asp.net core 1.1 with MVC entity framework?

net core 1.1 MVC with entity framework (code first) web app. I want to do TDD (test driven development), I've tryed several times to make a test project but I've failed, also searched for 2 hours on Google (and here)

I want to test controllers and ViewModels of my web app, but I'm not able to pass DbContext, so, how can I create and seed a dbContext for my tests and also manage users and sessions.

Thanks!

Aucun commentaire:

Enregistrer un commentaire