コード例 #1
0
        public async Task ShouldEnqueueHelloAndSync()
        {
            var protocol = new BoltProtocolV4_4(new Dictionary <string, string> {
                { "ContextKey", "ContextValue" }
            });

            await EnqueAndSync(protocol);
        }
コード例 #2
0
        public async Task GetRoutingTableShouldThrowOnNullConnectionObject()
        {
            var protocol = new BoltProtocolV4_4(new Dictionary <string, string> {
                { "ContextKey", "ContextValue" }
            });

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

            ex.Should().BeOfType <ProtocolException>().Which
            .Message.Should()
            .Contain("Attempting to get a routing table on a null connection");
        }
コード例 #3
0
        public async Task ShouldNotThrowOnImpersonatedUserAsync(string impUser)
        {
            var protocol = new BoltProtocolV4_4(new Dictionary <string, string> {
                { "ContextKey", "ContextValue" }
            });
            var mockConn = NewConnectionWithMode(AccessMode.Read);

            var exception = await Xunit.Record.ExceptionAsync(async() => await protocol.BeginTransactionAsync(mockConn.Object,
                                                                                                              string.Empty,
                                                                                                              Bookmark.From("123"),
                                                                                                              TransactionConfig.Default,
                                                                                                              impUser));

            Assert.Null(exception);
        }
コード例 #4
0
        public async void ShouldEnqueueHelloAndSyncNullContext()
        {
            var protocol = new BoltProtocolV4_4(null);

            await EnqueAndSync(protocol);
        }
コード例 #5
0
        public async Task ShouldEnqueueHelloAndSyncEmptyContext()
        {
            var protocol = new BoltProtocolV4_4(new Dictionary <string, string>());

            await EnqueAndSync(protocol);
        }