public AsyncUsage() { this.testee = new ArgumentActionHolder <MyArgument>(s => { this.action(s); return(Task.CompletedTask); }); }
public void TooFewArguments() { var testee = new ArgumentActionHolder <IBase>(BaseAction); Func <Task> action = async() => await testee.Execute(new object[] { }); action.Should().Throw <ArgumentException>(); }
public void NonMatchingType() { var testee = new ArgumentActionHolder <IBase>(BaseAction); Func <Task> action = async() => await testee.Execute(3); action.Should().Throw <ArgumentException>(); }
public async Task DerivedType() { var testee = new ArgumentActionHolder <IBase>(BaseAction); await testee.Execute(A.Fake <IDerived>()); }
public SyncUsage() { this.testee = new ArgumentActionHolder <MyArgument>(s => this.action(s)); }