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.
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.
Browser other questions tagged asp.net-mvc-4 unit-testing moq
You are not signed in. Login or sign up in order to post.
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.
– Leonel Sanches da Silva
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)...
– SirSmart
Look at this before using Moq.
– Leonel Sanches da Silva
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 ?
– SirSmart
Na Model, is that right? Why?
– Leonel Sanches da Silva