public void ActionIsInvokedWhenActionHolderIsExecuted() { var wasExecuted = false; void AnAction() => wasExecuted = true; var testee = new ArgumentLessActionHolder(AnAction); testee.Execute(null); wasExecuted .Should() .BeTrue(); }
public async Task SyncActionIsInvokedWhenActionHolderIsExecuted() { var wasExecuted = false; void SyncAction() => wasExecuted = true; var testee = new ArgumentLessActionHolder(SyncAction); await testee.Execute(null); wasExecuted .Should() .BeTrue(); }
public async Task AsyncActionIsInvokedWhenActionHolderIsExecuted() { var wasExecuted = false; Task AsyncAction() { wasExecuted = true; return(Task.CompletedTask); } var testee = new ArgumentLessActionHolder(AsyncAction); await testee.Execute(null); wasExecuted .Should() .BeTrue(); }