public void Does_not_throw_on_CommitTransaction_when_transactions_ignored()
        {
            var optionsBuilder = new DbContextOptionsBuilder()
                                 .UseInMemoryDatabase(b => b.IgnoreTransactions());

            var transactionManager = new InMemoryTransactionManager(optionsBuilder.Options);

            transactionManager.CommitTransaction();
        }
        public void Throws_on_CommitTransaction()
        {
            var optionsBuilder = new DbContextOptionsBuilder();

            optionsBuilder.UseInMemoryDatabase();

            var transactionManager = new InMemoryTransactionManager(optionsBuilder.Options);

            Assert.Equal(
                InMemoryStrings.TransactionsNotSupported,
                Assert.Throws <InvalidOperationException>(
                    () => transactionManager.CommitTransaction()).Message);
        }
        public void Throws_on_CommitTransaction()
        {
            var optionsBuilder = new DbContextOptionsBuilder();

            optionsBuilder.UseInMemoryDatabase(Guid.NewGuid().ToString());

            var transactionManager = new InMemoryTransactionManager(new FakeLogger());

            Assert.Equal(
                InMemoryStrings.LogTransactionsNotSupported.GenerateMessage(),
                Assert.Throws <InvalidOperationException>(
                    () => transactionManager.CommitTransaction()).Message);
        }