示例#1
0
            public async Task ShouldEnqueueHelloAndSync()
            {
                var mockConn = new Mock <IConnection>();

                mockConn.Setup(x => x.Server).Returns(new ServerInfo(new Uri("http://neo4j.com")));
                await BoltV3.LoginAsync(mockConn.Object, "user-zhen", AuthTokens.None);

                mockConn.Verify(x => x.Enqueue(It.IsAny <HelloMessage>(), It.IsAny <ServerVersionCollector>(), null), Times.Once);
                mockConn.Verify(x => x.SyncAsync());
                mockConn.Verify(x => x.UpdateId(It.IsAny <string>()));
            }