예제 #1
0
            public async Task ShouldEnqueueInitAndSync()
            {
                var mockConn = new Mock <IConnection>();

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

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