public void WebkitHandshake()
        {
            var handshaker = new DeflateFrameServerExtensionHandshaker();
            IWebSocketServerExtension extension = handshaker.HandshakeExtension(
                new WebSocketExtensionData(XWebkitDeflateFrameExtension, new Dictionary <string, string>()));

            Assert.NotNull(extension);
            Assert.Equal(WebSocketRsv.Rsv1, extension.Rsv);
            Assert.IsType <PerFrameDeflateDecoder>(extension.NewExtensionDecoder());
            Assert.IsType <PerFrameDeflateEncoder>(extension.NewExtensionEncoder());
        }
        public void FailedHandshake()
        {
            var handshaker = new DeflateFrameServerExtensionHandshaker();
            var parameters = new Dictionary <string, string>
            {
                { "unknown", "11" }
            };
            IWebSocketServerExtension extension = handshaker.HandshakeExtension(
                new WebSocketExtensionData(DeflateFrameExtension, parameters));

            Assert.Null(extension);
        }