Beispiel #1
0
        public void TextEntered_WhenRaised_ShouldExecuteCommand()
        {
            _sut = new MonitoredRemoteOperator(_autoLocalConnector, _remoteTraceMonitor, _recorder);

            Mock.Raise(() => _remoteTraceMonitor.CommandReceived += null, "text");

            Mock.Assert(() => _autoLocalConnector.ExecuteCommand("text"), Occurs.Exactly(1));
        }
Beispiel #2
0
 private Task <bool> TextEnteredHandler(string value)
 {
     return(SafeExecution.TryCatchWithResultAsync(() => _autoLocalConnector.ExecuteCommand(value),
                                                  exception => _recorder.DefaultException(this, exception)));;
 }
Beispiel #3
0
        public void ExecuteCommand_WhenCalled_ShouldExecuteCommand()
        {
            _sut.ExecuteCommand("command");

            Mock.Assert(() => _connectParser.ExecuteCommand("command"), Occurs.Once());
        }