public void Build_ShouldThrowForNullBusyStack() { var commandManager = Utils.GetTestCommandManager(); var context = new CommandBuilderContext <object>(commandManager, Utils.GetTestExceptionHandler(), Utils.TestBusyStackFactory, Utils.TestExecute, Utils.TestCanExecute); Assert.Throws <ArgumentNullException>(() => context.WithBusyNotification(null)); }
public void Build_ShouldAssignBusyStack() { var commandManager = Utils.GetTestCommandManager(); var customBusyStack = NSubstitute.Substitute.For <IBusyStack>(); var context = new CommandBuilderContext <object>(commandManager, Utils.GetTestExceptionHandler(), Utils.TestBusyStackFactory, Utils.TestExecute, Utils.TestCanExecute); context.WithBusyNotification(customBusyStack); Assert.IsInstanceOf <IBusyStack>(context.BusyStack); }