public void DisposesConnection()
        {
            var connection = new TransactedDbConnection(new FakeDbConnection(new FakeDbCommand()));

            connection.Open();

            connection.Dispose();

            Assert.Equal(ConnectionState.Closed, connection.State);
        }
        public void ChangesDatabaseName()
        {
            var connection = new TransactedDbConnection(
                new FakeDbConnection(
                    new FakeDbCommand()));

            var name = "new database name";

            connection.ChangeDatabase(name);

            Assert.Equal(name, connection.Database);
        }
        public void CreatesTransactedCommand()
        {
            var connection = new TransactedDbConnection(new FakeDbConnection(new FakeDbCommand()));

            Assert.Equal(connection.BeginTransaction(), connection.CreateCommand().Transaction);
        }