コード例 #1
0
        public void Verify_multiple_executor_classes_are_scanned_correctly()
        {
            //TestCommand1 is handled by an executor with two methods
            var cmd1 = new TestCommand1();
            sut.GetExecutorFor(typeof(TestCommand1)).Invoke(cmd1);
            cmd1.CallCount.Should().Be.EqualTo(1);

            var cmd2 = new TestCommand2();
            sut.GetExecutorFor(typeof(TestCommand2)).Invoke(cmd2);
            cmd2.CallCount.Should().Be.EqualTo(1);
        }
コード例 #2
0
 public void ExecutingAnotherCommand(TestCommand2 testCommand)
 {
     testCommand.CallCount++;
 }