public void WithJsonProtocolRegistersJsonProtocol()
        {
            var connectionBuilder = new HubConnectionBuilder();

            connectionBuilder.WithJsonProtocol();
            Assert.IsType <JsonHubProtocol>(connectionBuilder.GetHubProtocol());
        }
        public void WithMessagePackProtocolRegistersMessagePackProtocol()
        {
            var connectionBuilder = new HubConnectionBuilder();

            connectionBuilder.WithMessagePackProtocol();
            Assert.IsType <MessagePackHubProtocol>(connectionBuilder.GetHubProtocol());
        }
        public void WithHubProtocolRegistersGivenProtocol()
        {
            var connectionBuilder = new HubConnectionBuilder();
            var hubProtocol       = Mock.Of <IHubProtocol>();

            connectionBuilder.WithHubProtocol(hubProtocol);
            Assert.Same(hubProtocol, connectionBuilder.GetHubProtocol());
        }