コード例 #1
0
        public void TooFewArguments()
        {
            var testee = new ArgumentActionHolder <IBase>(BaseAction);

            Action action = () => testee.Execute(new object[] { });

            action.ShouldThrow <ArgumentException>();
        }
コード例 #2
0
        public void NonMatchingType()
        {
            var testee = new ArgumentActionHolder <IBase>(BaseAction);

            Action action = () => testee.Execute(3);

            action.ShouldThrow <ArgumentException>();
        }
コード例 #3
0
        public void MatchingType()
        {
            var testee = new ArgumentActionHolder <IBase>(BaseAction);

            testee.Execute(A.Fake <IBase>());
        }
コード例 #4
0
        public void DerivedType()
        {
            var testee = new ArgumentActionHolder <IBase>(BaseAction);

            testee.Execute(A.Fake <IDerived>());
        }
コード例 #5
0
 public ArgumentActionHolderTest()
 {
     this.testee = new ArgumentActionHolder <MyArgument>(s => this.action(s));
 }