I could have sworn I hit post on this topic but it's not appearing in the list for me so here it is again. If a moderator sees a similar topic by me, feel free to remove one. Sorry.
I'm not sure why the following won't compile.
var mockCookieHandler = new Mock<ICookieHandler>();
mockCookieHandler.Verify(x => x.SaveCookie(It.IsAny<Dictionary<string, string>>(), It.IsAny<string>(), It.IsAny<DateTime>()), Times.Once);
These are the two errors I get for the Verify line.
Error 1 The best overloaded method match for 'Moq.Mock<FPO.Domain.Helpers.Web.ICookieHandler>.Verify(System.Linq.Expressions.Expression<System.Action<FPO.Domain.Helpers.Web.ICookieHandler>>, string)' has some invalid arguments
Error 2 Argument 2: cannot convert from 'method group' to 'string'
This is the signature of the CookieHandler class I'm trying to call.
public void SaveCookie(Dictionary<string, string> values, string cookieName, DateTime? persistUntilDate)
Any ideas how I can make this work? Thanks.