コード例 #1
0
        public void ShouldBubbleException()
        {
            Assert.Throws <DivideByZeroException>(() =>
            {
                TestableCompositeCommand multiCommand = new TestableCompositeCommand();
                BadDivisionCommand testCommand        = new BadDivisionCommand();

                multiCommand.RegisterCommand(testCommand);
                multiCommand.Execute(null);
            });
        }
コード例 #2
0
        public void ShouldBubbleException()
        {
            Assert.Throws<DivideByZeroException>(() =>
            {
                TestableCompositeCommand multiCommand = new TestableCompositeCommand();
                BadDivisionCommand testCommand = new BadDivisionCommand();

                multiCommand.RegisterCommand(testCommand);
                multiCommand.Execute(null);
            });
        }