I have a method on my interface that looks like:
T GetSingle(Expression> criteria);
I\'m trying to mock the setup som
I managed to get this to work:
Expression> expr = user => user.EmailAddress == "a@b.com"; _mockUserRepository.Setup(c => c.GetSingle(It.Is>>(criteria => criteria == expr))) .Returns(new User { EmailAddress = "a@b.com" }); User result = _mockUserRepository.Object.GetSingle(expr);