Let\'s say we are testing a class C which has 2 methods M1 and M2 where M1 calls M2 when executed. Testing M2 is ok, but how can we test M1? The difficulty is that we need to mock M2 if I\'m not misu
Folks How toExposte RhinoMock Objects as properties I am trying following 开发者_如何学Gocode snippet
In \'spring-test\' there\'s mock classes for unit testing Servlets, which is very useful. Unfortuately, I do not need any of the other Spring componenets, and do not wish to depend on spring-core in m
So I\'m trying to unit-test a controller method.I\'m using MSTest in VS 2010, and Moq 3.1 Test method:
in Ruby, there\'s this awesome library called a Mash which is a Hash but through clever use of missing_method can convert:
Most or all of Endeca\'s objects have internal constructors. I\'m working on a good project that lacks gr开发者_开发问答eat test coverage around the Endeca API, are there any good strategies to unit t
While writing functional tests for a controller, I came across a scenario where I have a before_filter requesting some information from the database that one of my tests requires. I\'m using Factory_g
I\'m getting the exception The type initializer for \'Moq.Mock`1\' threw an exception. using Moq 4.0 I\'ve checked around on a couple of forums and they allude to using the Moq-NoCastle version.I
I am working with a faked HttpContext (code provided in the end) and probably I am missing something because I can\'t access TempData collection (forth line of SetFakeControllerContext method). Every
I\'m trying to mock an interface\'s events like the following: [TestMethod] public void NeedingDataFiresEvents()