public void CanHandle_TerminateMessage_True()
        {
            // arrange
            var handler = new TerminateConnectionMessageHandler();
            var message = new TerminateConnectionMessage();

            // act
            bool result = handler.CanHandle(message);

            // assert
            Assert.True(result);
        }
        public void CanHandle_AcceptMessage_False()
        {
            // arrange
            var handler = new TerminateConnectionMessageHandler();
            var message = KeepConnectionAliveMessage.Default;

            // act
            bool result = handler.CanHandle(message);

            // assert
            Assert.False(result);
        }
        public void CanHandle_TerminateMessage_True()
        {
            // arrange
            var interceptor = new SocketSessionInterceptorMock();
            var handler     = new TerminateConnectionMessageHandler(interceptor);
            var message     = new TerminateConnectionMessage();

            // act
            var result = handler.CanHandle(message);

            // assert
            Assert.True(result);
        }
        public void CanHandle_AcceptMessage_False()
        {
            // arrange
            var interceptor = new SocketSessionInterceptorMock();
            var handler     = new TerminateConnectionMessageHandler(interceptor);
            KeepConnectionAliveMessage message = KeepConnectionAliveMessage.Default;

            // act
            var result = handler.CanHandle(message);

            // assert
            Assert.False(result);
        }