public void TooFewArguments() { var testee = new ArgumentActionHolder <IBase>(BaseAction); Action action = () => testee.Execute(new object[] { }); action.ShouldThrow <ArgumentException>(); }
public void NonMatchingType() { var testee = new ArgumentActionHolder <IBase>(BaseAction); Action action = () => testee.Execute(3); action.ShouldThrow <ArgumentException>(); }
public void MatchingType() { var testee = new ArgumentActionHolder <IBase>(BaseAction); testee.Execute(A.Fake <IBase>()); }
public void DerivedType() { var testee = new ArgumentActionHolder <IBase>(BaseAction); testee.Execute(A.Fake <IDerived>()); }
public ArgumentActionHolderTest() { this.testee = new ArgumentActionHolder <MyArgument>(s => this.action(s)); }