public void ShouldThrowAHandshakeExceptionForNonGetMethods()
        {
            var sendAction = MockRepository.GenerateMock<Func<byte[], Task>>();
            var request = MockRepository.GenerateStrictMock<IRequest>();
            request.Expect(r => r.Method).Return("Something else");

            var underlyingNegotiator = MockRepository.GenerateStrictMock<IHandshakeNegotiator>();
            underlyingNegotiator.Expect(n => n.Negotiate(Arg<IRequest>.Is.NotNull, Arg<Func<byte[], Task>>.Is.NotNull)).Repeat.Never();

            var negotiator = new MethodNotAllowedHandshakeNegotiator(underlyingNegotiator);

            negotiator.Negotiate(request, sendAction);
        }
        public void ShouldDelegateToUnderlyingNegotiatorForGetMethods()
        {
            var sendAction = MockRepository.GenerateStrictMock<Func<byte[], Task>>();
            var request = MockRepository.GenerateStrictMock<IRequest>();
            request.Expect(r => r.Method).Return("GET");

            var underlyingNegotiator = MockRepository.GenerateStrictMock<IHandshakeNegotiator>();
            underlyingNegotiator.Expect(n => n.Negotiate(Arg<IRequest>.Is.NotNull, Arg<Func<byte[], Task>>.Is.NotNull));

            var negotiator = new MethodNotAllowedHandshakeNegotiator(underlyingNegotiator);

            negotiator.Negotiate(request, sendAction);
        }