I\'ve got an ASP.NET MVC 2 Web app in VS 2010 and decided to try using MS unit testing stuff. What do you know, on the first test I created it gives me grief and refuses to elaborate.
I\'ve seen a lot of similar threads but none that a开发者_开发知识库ctually address my particular situation.
I\'m trying to mock a class from the Microsoft Sync Framework. It only has an internal constructor. When I try the following:
I got this really cool Moq method that fakes out my GetService, looks like this private Mock<IGetService<TEntity>开发者_StackOverflow中文版;> FakeGetServiceFactory<TEntity>(List<T
I have a function that updates a user in the asp.net membership provider. <AcceptVerbs(HttpVerbs.Post)>
With the following code (using Moq 4.0.10501.6): HomeController controller = new HomeController(); ActionResult result = _controller.Index();
I am learning Test Driven Devel开发者_如何学JAVAopment and trying to use Moq library for mocking. What is the purpose of Setup method of Mock class?The default behaviour of a Moq Mock object is to stu
I am toying around to learn how to unit test ASP.NET MVC controller actions.Specifically I\'m trying to mock the ControllerContext so that I can test an action that accesses HttpContext.Current.User.I
I have started using moq for mocking. Can someone explain me the concept of strict and non-strict mocks? How can 开发者_JS百科they can be used in moq?
I am trying to set up expectat开发者_开发百科ions on methods of a mocked object in Moq. At the same time, using Ninject, I try to have the kernel return my set up mock whenever a caller wants the corr