public void ShouldThrowExceptionIfVersionIsNotSupported(int version, string errorMessage) { var exception = Record.Exception(() => BoltProtocolFactory.ForVersion(version)); exception.Should().BeOfType <NotSupportedException>(); exception.Message.Should().StartWith(errorMessage); }
public void ShouldCreateBoltProtocolV4() { var connMock = new Mock <ITcpSocketClient>(); TcpSocketClientTestSetup.CreateWriteStreamMock(connMock); TcpSocketClientTestSetup.CreateReadStreamMock(connMock); var boltProtocol = BoltProtocolFactory.ForVersion(4); boltProtocol.Should().BeOfType <BoltProtocolV4>(); }
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>(); }