public void ShouldThrowWhenADatabaseIsGiven(string database)
            {
                var V3 = new BoltProtocolV3();

                V3.Awaiting(p => p.BeginTransactionAsync(Mock.Of <IConnection>(), database, Bookmark.From("123"),
                                                         TransactionConfig.Default))
                .Should().Throw <ClientException>().WithMessage("*that does not support multiple databases*");
            }
Example #2
0
            public void ShouldThrowWhenADatabaseIsGiven(string database)
            {
                var V3       = new BoltProtocolV3();
                var mockConn = NewConnectionWithMode(AccessMode.Read);

                V3.Awaiting(p => p.BeginTransactionAsync(mockConn.Object, database, Bookmark.From("123"),
                                                         TransactionConfig.Default, null))
                .Should().Throw <ClientException>().WithMessage("*that does not support multiple databases*");
            }
            public void ShouldThrowWhenADatabaseIsGiven(string database)
            {
                var V3 = new BoltProtocolV3();

                V3.Awaiting(p => p.RunInAutoCommitTransactionAsync(Mock.Of <IConnection>(), new Query("text"),
                                                                   false, Mock.Of <IBookmarkTracker>(), Mock.Of <IResultResourceHandler>(), database,
                                                                   Bookmark.From("123"),
                                                                   TransactionConfig.Default))
                .Should().Throw <ClientException>().WithMessage("*that does not support multiple databases*");
            }