public class FluxorEffects
{
[EffectMethod]
public async Task OnExecuteRequestAction(ExecuteRequestAction action, IDispatcher dispatcher)
{
var result = await <something>;
dispatcher.Dispatch(new SetResultsAction(result));
}
}
And I want to write a unit test for this, I end up with something like:
Of course, not awaiting anywhere, the Assert is executed way before the effect. I don't really understand how I can dispatch synchronously an action that is then processed (in the effect) asynchronously... I'm missing something, surely... :-)
Thanks!
If I have an effect like the following:
And I want to write a unit test for this, I end up with something like:
Of course, not awaiting anywhere, the Assert is executed way before the effect. I don't really understand how I can dispatch synchronously an action that is then processed (in the effect) asynchronously... I'm missing something, surely... :-) Thanks!