예제 #1
0
            public void ShouldThrowExceptionIfVersionIsNotSupported(int version, string errorMessage)
            {
                var exception = Record.Exception(() => BoltProtocolFactory.ForVersion(version));

                exception.Should().BeOfType <NotSupportedException>();
                exception.Message.Should().StartWith(errorMessage);
            }
예제 #2
0
            public void ShouldCreateBoltProtocolV4()
            {
                var connMock = new Mock <ITcpSocketClient>();

                TcpSocketClientTestSetup.CreateWriteStreamMock(connMock);
                TcpSocketClientTestSetup.CreateReadStreamMock(connMock);
                var boltProtocol = BoltProtocolFactory.ForVersion(4);

                boltProtocol.Should().BeOfType <BoltProtocolV4>();
            }
예제 #3
0
            public void ShouldCreateBoltProtocolV4_3()
            {
                var connMock = new Mock <ITcpSocketClient>();

                TcpSocketClientTestSetup.CreateWriteStreamMock(connMock);
                TcpSocketClientTestSetup.CreateReadStreamMock(connMock);
                var boltProtocol = BoltProtocolFactory.ForVersion(BoltProtocolV4_3.Version, new Dictionary <string, string>());

                boltProtocol.Should().BeOfType <BoltProtocolV4_3>();
            }