markrendle/Simple.Data — Issue #140: Transaction Support with InMemoryAdapter
Author: Molokai
Created: 2012-01-23 21:39:30+00:00
State: open

Given:

var db = Database.UseMockAdapter(new InMemoryAdapter());
db.BeginTransaction() throws NotSupportedException - "Specified method is not supported"

Is there any recommended way to use both transactions AND unit tests with the InMemoryAdapter?

I guess I could just subclass the InMemoryAdapter and implement a dummy IAdapterWithTransactions which just calls the non-transactional methods and implements empty commit/rollback methods.

Or are there better approaches?