예제 #1
0
 public AsyncUsage()
 {
     this.testee = new ArgumentActionHolder <MyArgument>(s =>
     {
         this.action(s);
         return(Task.CompletedTask);
     });
 }
예제 #2
0
            public void TooFewArguments()
            {
                var testee = new ArgumentActionHolder <IBase>(BaseAction);

                Func <Task> action = async() => await testee.Execute(new object[] { });

                action.Should().Throw <ArgumentException>();
            }
예제 #3
0
            public void NonMatchingType()
            {
                var testee = new ArgumentActionHolder <IBase>(BaseAction);

                Func <Task> action = async() => await testee.Execute(3);

                action.Should().Throw <ArgumentException>();
            }
예제 #4
0
            public async Task DerivedType()
            {
                var testee = new ArgumentActionHolder <IBase>(BaseAction);

                await testee.Execute(A.Fake <IDerived>());
            }
예제 #5
0
 public SyncUsage()
 {
     this.testee = new ArgumentActionHolder <MyArgument>(s => this.action(s));
 }