public void ReadOnlyTransactionThrowsOnWriteAccess() { using (IKeyValueDB db = new InMemoryKeyValueDB()) { using (var tr = db.StartReadOnlyTransaction()) { Assert.Throws<BTDBTransactionRetryException>(() => tr.CreateKey(new byte[1])); } } }