I am trying to find a generic way of initializing a mock repository for my test class. As I have multiple repositories I tried doing it using generics. I have a generic repository interface:
I\'m struggling with some very basic/conceptual problem with Moq and StructureMap. Given the following code, the test fails. Why? It seems that my mocked/injected functionality on the Numbers property
I\'ve read a lot about mocking/stubbing/faking - and still hit my mental roadblocks. I\'m trying to adapt MVP (Model View Presenter) with a \"fun\" weight loss tracking system I\'m building for my ow
I am passing this into the constructor of an object I am unit testing It.Is<List<List<s开发者_JAVA技巧tring>>>(x => x.Count == 10)
public void SubmitMessagesToQueue_OneMessage_SubmitSuccessfully() { var messageServiceClientMock = new Mock<IMessageServiceClient>();
When i\'m using a Transactionscope that i don\'t commmit, moq still sees all the rolled back calls to the database.
I am wondering how to get around this. I am using nhibernate and fluent. I have a domain class like this
I am trying to write my first unit test for one of my service layers. I am using nunit and moq (latest versions).
I want to Moq next object: abstract class Foo { public string Bar { get; protected set; } } so that new Mock<Foo>().Bar return \"Blah\".
I have a class that looks like this: class MyClass { private IDependency dep; public MyClass(IDependency dep) {