コード例 #1
0
        public void QueuesLogEvaluatorIfUnrecognizedEvaluator()
        {
            var settings           = Substitute.For <ISettingsStore>();
            var uiMap              = Substitute.For <IUIMap>();
            var messages           = Substitute.For <IMessageManager>();
            var eventManager       = Substitute.For <IEventManager>();
            var logger             = Substitute.For <ILogger>();
            var commandFlowManager = new CommandFlowManager(settings, uiMap, messages, eventManager, logger);

            commandFlowManager.QueueCommand("nonexistantevaluator abcd efgh ijkl mnop");

            eventManager.Received(1).AddEvent(Arg.Any <LogEvaluator>(), Arg.Any <Time>());
        }
コード例 #2
0
        public void QueuesPrintEvaluator()
        {
            var settings           = Substitute.For <ISettingsStore>();
            var uiMap              = Substitute.For <IUIMap>();
            var messages           = Substitute.For <IMessageManager>();
            var eventManager       = Substitute.For <IEventManager>();
            var logger             = Substitute.For <ILogger>();
            var commandFlowManager = new CommandFlowManager(settings, uiMap, messages, eventManager, logger);

            commandFlowManager.QueueCommand("print abcdefg");

            eventManager.Received(1).AddEvent(Arg.Any <PrintEvaluator>(), Arg.Any <Time>());
        }