Reputation: 14964
I am used to using JMock in Java which allows you to specify things such as any(String.class) as an expected argument - which .NET frameworks offer similar functionality?
Upvotes: 1
Views: 97
Reputation: 116401
In TypeMock the default is don't care for specific arguments. So unless you want to check specific arguments, you just set up you mock to return whatever needs to be returned.
Upvotes: 2
Reputation: 233150
MOQ allows you specify constraints, such as
mock.Setup(x => x.DoStuff(It.IsAny<string>())).Returns("Foo");
There are other constraints available as well.
Rhino Mocks have basically the same feature set.
Upvotes: 2
Reputation: 32698
I've used both Rhino Mocks and Moq and they both have this functionality.
Upvotes: 1
Reputation:
MOQ has this functionality. I don't know about any of the other available frameworks.
Upvotes: 0