コード例 #1
0
 public void SendMessageOnSessionShouldBeInvokedOnceWithChannelEofMessage()
 {
     SessionMock.Verify(
         p => p.SendMessage(It.Is <ChannelEofMessage>(e => e.LocalChannelNumber == _remoteChannelNumber)),
         Times.Once);
 }
 public void TrySendMessageOnSessionShouldNeverBeInvokedForChannelEofMessage()
 {
     SessionMock.Verify(
         p => p.TrySendMessage(It.Is <ChannelEofMessage>(c => c.LocalChannelNumber == _remoteChannelNumber)),
         Times.Never);
 }
 public void TryWaitOnSessionShouldBeInvokedOnce()
 {
     SessionMock.Verify(p => p.TryWait(It.IsAny <EventWaitHandle>(), _channelCloseTimeout), Times.Once);
 }
 public void ChannelCloseMessageShouldBeSentOnce()
 {
     SessionMock.Verify(p => p.TrySendMessage(It.Is <ChannelCloseMessage>(m => m.LocalChannelNumber == _remoteChannelNumber)), Times.Once);
 }
 public void TrySendMessageOnSessionShouldBeInvokedOnceForChannelCloseMessage()
 {
     SessionMock.Verify(
         p => p.TrySendMessage(It.Is <ChannelCloseMessage>(c => c.LocalChannelNumber == _remoteChannelNumber)),
         Times.Once);
 }
 public void SendMessageOnSessionShouldNeverBeInvoked()
 {
     SessionMock.Verify(p => p.SendMessage(It.IsAny <Message>()), Times.Never);
 }
コード例 #7
0
 public void UnRegisterMessageWithUserAuthBannerShouldBeInvokedOnce()
 {
     SessionMock.Verify(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_BANNER"), Times.Once);
 }
コード例 #8
0
 public void UnRegisterMessageWithUserAuthSuccessShouldBeInvokedOnce()
 {
     SessionMock.Verify(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_SUCCESS"), Times.Once);
 }
コード例 #9
0
 public void UnRegisterMessageWithUserAuthFailureShouldBeInvokedOnce()
 {
     SessionMock.Verify(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_FAILURE"), Times.Once);
 }
 public void WaitOnHandleOnSessionShouldBeInvokedOnce()
 {
     SessionMock.Verify(p => p.WaitOnHandle(It.IsAny <EventWaitHandle>()), Times.Once);
 }