Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
0 answers
404 views

Moq setup does not match parameter because it is a subtype?

I'm trying to use Setup on a Moq like I've done many times to return a value, but I can't seem to understand why the parameter matching fails in this case. Here's what I'm doing: var myParameter = ...
MarioDS's user avatar
  • 13.1k
0 votes
0 answers
541 views

Jmockit: Mock calls in the @Parameters method

I have a parameterized test class @RunWith(Parameterized.class) class Tests{ private int count; MyClass object; @Parameters public static Collection<Object[]> data() { ...
deborah-digges's user avatar
0 votes
1 answer
1k views

Setting expectations on MoQ

I'm using MoQ to test some controllers I have. I'm not able to set the expectations. This is the code I have: var rep = new Mock<IUserRepository>(); rep.Setup(r => r.Save()); ...
tucaz's user avatar
  • 6,684