示例#1
0
        public async Task ShouldEnqueueHelloAndSync()
        {
            var V4_3 = new BoltProtocolV4_3(new Dictionary <string, string> {
                { "ContextKey", "ContextValue" }
            });

            await EnqueAndSync(V4_3);
        }
示例#2
0
        public async Task GetRoutingTableShouldThrowOnNullConnectionObject()
        {
            var v4_3 = new BoltProtocolV4_3(new Dictionary <string, string> {
                { "ContextKey", "ContextValue" }
            });

            var ex = await Xunit.Record.ExceptionAsync(async() => await v4_3.GetRoutingTable(null, "adb", null));

            ex.Should().BeOfType <ProtocolException>().Which
            .Message.Should()
            .Contain("Attempting to get a routing table on a null connection");
        }
        public async Task RoutingTableShouldContainDatabaseName()
        {
            var databaseName = "myDatabaseName";
            var protocol     = new BoltProtocolV4_3(new Dictionary <string, string> {
                { "ContextKey", "ContextValue" }
            });
            var connection = SetupMockedConnection(databaseName);

            var routingTable = await protocol.GetRoutingTable(connection, databaseName, null, null);

            routingTable.ToDictionary().Should().ContainKey("db").WhichValue.Should().Be(databaseName);
        }
示例#4
0
        public async void ShouldEnqueueHelloAndSyncNullContext()
        {
            var V4_3 = new BoltProtocolV4_3(null);

            await EnqueAndSync(V4_3);
        }
示例#5
0
        public async Task ShouldEnqueueHelloAndSyncEmptyContext()
        {
            var V4_3 = new BoltProtocolV4_3(new Dictionary <string, string>());

            await EnqueAndSync(V4_3);
        }