public async Task SyncActionIsInvokedWhenGuardHolderIsExecuted() { var wasExecuted = false; bool SyncGuard() { wasExecuted = true; return(true); } var testee = new ArgumentLessGuardHolder(SyncGuard); await testee.Execute(null); wasExecuted .Should() .BeTrue(); }
public async Task AsyncActionIsInvokedWheGuardHolderIsExecuted() { var wasExecuted = false; Task <bool> SyncGuard() { wasExecuted = true; return(Task.FromResult(true)); } var testee = new ArgumentLessGuardHolder(SyncGuard); await testee.Execute(null); wasExecuted .Should() .BeTrue(); }
public void ActionIsInvokedWhenGuardHolderIsExecuted() { var wasExecuted = false; bool Guard() { wasExecuted = true; return(true); } var testee = new ArgumentLessGuardHolder(Guard); testee.Execute(null); wasExecuted .Should() .BeTrue(); }