MOQ – setting up a method based on argument values (multiple arguments)

I know this is a year old, but I found a way to use multiple parameters with the latest version of Moq at least:

mock.Setup(x => x.Method(It.IsAny<int>(), It.IsAny<int>()))
    .Returns<int, int>((a, b) => a < b);

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)