예제 #1
0
        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));
        }
예제 #2
0
        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);
        }