I\'ve just been working on some tests using Moq but ran into trouble trying to test a method I wanted to call twice through a try catch block.The principle is that the first call throws an exception,
This seems like an easy enough issue but I can\'t seem to find the keywords to effect my searches. I\'m trying to unit test by mocking out all objects within this method call. I am able to do so to a
When I try to mock a class using Moq the method attribute gets inherited to the mock class, but not the parameter attribute.
Whats the best way to setup a mock expection for the Map function in AutoMapper. I extract the IMapper interface so I can setup expects for that interface. My mapper has dependencies, so I have to pa
i have the following code, which fails during runtime... var mock = new Mock<ControllerContext>();
I have a method that calls a service to retrieve an instance of an object, updates the instance then saves the instance back to the service (the code for this is below).
I have a preexisting Interface... public interface ISomeInterface { void SomeMethod(); } and I\'ve extended this intreface using a mixin...
I\'m using the Moq framework to do my unit testing.I\'m following some really useful instructions outlined here to help me mock the httpcontext, specifically for the purposes of testing the url referr
If I have a method that calls itself under a certain condition, is it possible to write a test to verify the behavior? I\'d l开发者_JS百科ove to see an example, I don\'t care about the mock framework
Is it possible to modify an invocation parameter of a mocked method? In particular I\'m looking to change buffer in the following example to a pre-populated byte array.