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

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

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

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

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

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