unit testing - A.CallTo method that uses expression as a parameter -
i'm trying this, , doesn't work, although kinda should be a.callto(() => partyrepo.where(o => o.person != null)) .returns(new[] {new party()}); the call method exact code parameter returns empty enumerable the reason expression you're passing in call specification , 1 that's sent partyrepo not equal. there's no way fakeiteasy determine if arguments use equals-method. i'm not sure best workaround, this: public static class myargumentconstraints { public static func<myclass, bool> returnstruewhenpersonisnotnull(this iargumentconstraintmanager<func<myclass, bool>> manager) { return manager.nullcheckedmatches(x => { return x.invoke(new myclass() {person = "person"}) && !x.invoke(new myclass() {person = nu...