earlier today I asked this question. So since moq creates it\'s own class from an interface I wasn\'t able to cast it to a different class.
I have the following mocks: var MockHttpContext = new Mock<HttpContextBase>(); var MockPrincipal = new Mock<IPrincipal>();
i\'m just learning to put in unit testing for my asp.net mvc when i came to learn about the mock and the different frameworks there is out there now.
I am novice to the Moq and unit testing. I have to write unit tests to a lot of classes which has the objects of other classes. can i mock the methods of the class objects. Here is the exact scenerio-
I have a class which has a internal method and i want to mock the internal method . But i am unable to mock it i.e. it is not calling the mocked function but calling the original function. Is there an
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
just a simple question here. I\'ve used Moq for awhile but, as of yet, have only used it for stubbing and not for mocking. I am trying to introduce our developers to unit testing. I set up a simple ex
I am receiving the following exception when trying to run my unit tests using .net 4.0 under VS2010 with moq 3.1.
I´m encountering this problem trying to mock some objects that receive complex lambda expressions in my projects. Mostly with with proxy objects that receive this type of delegate:
I am new to moq and I was trying to test a controller (MVC) behaviour that when the view raises a certain event, controller calls a certain function on model, here are the classes -