public void ShouldBubbleException() { TestableCompositeCommand multiCommand = new TestableCompositeCommand(); BadDivisionCommand testCommand = new BadDivisionCommand(); multiCommand.RegisterCommand(testCommand); multiCommand.Execute(null); }
public void ShouldBubbleException() { Assert.Throws <DivideByZeroException>(() => { TestableCompositeCommand multiCommand = new TestableCompositeCommand(); BadDivisionCommand testCommand = new BadDivisionCommand(); multiCommand.RegisterCommand(testCommand); multiCommand.Execute(null); }); }
public void ShouldBubbleException() { Assert.Throws<DivideByZeroException>(() => { TestableCompositeCommand multiCommand = new TestableCompositeCommand(); BadDivisionCommand testCommand = new BadDivisionCommand(); multiCommand.RegisterCommand(testCommand); multiCommand.Execute(null); }); }