Is it possible to return different results based on the input, like in
MoqSecurityAdminHelper.Setup(x => x.GetAllQuestions(It.IsAny<Boolean>())) .Returns(new Dictionary<String, String> { {"Key1", "Value1"}, {"Key2", "Value2"} });
but if the argument is true return one result, if false... another.
Or is the only way to do it having 2 separate setups?
Thanks
MoqSecurityAdminHelper.Setup(x => x.GetAllQuestions(It.IsAny<Boolean>())) .Returns((bool param) => param ? someResult : someOtherResult );
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With