Using Moq with MVC Dotnet

Asked

Viewed 64 times

2

I am using MVC4 with Moq and would like to know how to mock mine Model also and if this is possible.

Thank you.

  • It’s possible. Inside the [tag:Moq] tag is information about tutorials and examples that you can use to mount your unit tests. Click "Learn more..." to access the Wiki.

  • Gypsy I’m not finding a mock example of a database, you know where I can find something like ? Because in case of testing the Model, I would need to mock the database (access component to the database)...

  • Look at this before using Moq.

  • Cool, but I’m not using Entity, I’m using a component I only call on the model and it does access to my database. Still I could do ?

  • Na Model, is that right? Why?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.