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.

this think happens. diagram of threads


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -