what I want to do is construct a m开发者_如何学Pythonoq for I1 - which is fine ... however in the course of the method that I am testing that uses this mock I need to cast it to I2 in order to access
I want to use moq a void method and set a value to a protected property when is called. public class MyClass{ public Guid Id {get; protected set; } }
We are using Moq to unit test our service classes, but are stuck on how to test situations where a service method calls another service method of the same class.I tried setting the method being called
I\'ve seen how to Fake the SessionState object in MVC using Scott Hanselmans MvcMockHelpers, but I\'m dealing with a separate problem.
Banging my head against a wall trying to get a really simple testing scenario working. I\'m sure I\'m missing something really simple!
When attempting to follow the article on mocking the htmlhelper with Moq I ran in to the following problem.The exception is thrown on creation of the htmlhelper.I am only guessing that castle windsor
I am using Moq as my mocking framework. As per the code below, I have two mocks setup and I would like to setup the second to return the first mock. Is this possible and if so how would I go about doi
Can\'t figure out the syntax. //class under test开发者_JAVA百科 public class CustomerRepository : ICustomerRepository{
I have an interface like so: Interface IWriteFile { string FileName {get;set;} void Open(); void WriteData(string dataToWrite);
I am trying to use VerifySet with Moq to check the number of times a setter on a collaborating Object i开发者_如何转开发s being called. But when I put in the Times portion of the call I get an error t