Let\'s say I have a plain class with several functions: public class MyClass { public int GetTotal(int myValue, string myString)
Using Moq, RhinoMocks or a similar framework, is there a way to configure a mock to implement both get and set on all properties of an object even if the interface does not?
I have a repository with an Add method that takes an IEnumerable as parameter: public void Add<T>(T item) where T : class, new(){}
I have some troubles using Moq. Following unit test throws an exception, even though the according method will be called.
I am using Specflow, nunit and moq to test the default MVC2 application registration as I learn SpecFlow.
I want to write unit tests for MyClass but its base class is an abstract class. public class MyClass : AbstractBaseClass
What may 开发者_JS百科cause It.IsAny<string>() to return null at every call?Am I incorrect in assuming that it is designed to return a non-null string?
I am trying my hand on EF with EF4.1 Code Frist. I have developed my models, like: public class User { [Key]
I have the following test: [Test] public void VerifyThat_WhenInitializingTheLoggingInterceptionFacility_TheLoggingInterceptorIsAdded()
Trying to unit test a class whose constructor takes in a Func. Not sure how to mock it using Moq. public class FooBar