c# - Fake it easy with actions - Says it can't find call but shows it in list -
i'm using fake easy :
var callbackaction = a.fake<action<object>>(); //act token.registerchangecallback(callbackaction, "hi"); //assert a.callto(() => callbackaction.invoke(a<object>.ignored)).musthavehappened();
and i'm getting error
fakeiteasy.expectationexception : assertion failed following call: system.action`1[system.object].invoke(obj: <ignored>) expected find once found #0 times among calls: 1: system.action`1[system.object].invoke(obj: "hi)
this seems odd me. understand if had found none or if overriding equals() odd has found call , i'm using ignored not matching them up. using actions?
this due fact thread spawned waits condition , action called in thread. while in test condition true , thread returns after starting still doesn't call action in time assert. assume after collects calls have happened object error message , @ point thread has returned , call has happened , results in odd error message.
Comments
Post a Comment