TransactionTestBase<TTestStore, TFixture> TransactionTestBase(Of TTestStore, TFixture) Class

Definition

public abstract class TransactionTestBase<TTestStore, TFixture> : IClassFixture<TFixture>, IDisposable where TTestStore : RelationalTestStore where TFixture : TransactionFixtureBase<TTestStore>, new ()
Public MustInherit Class TransactionTestBase(Of TTestStore As RelationalTestStore, TFixture As {TransactionFixtureBase(Of TTestStore), New})
    Inherits IClassFixture(Of TFixture)
    Implements IDisposable
Type Parameters
TTestStore
TFixture
Inheritance
System.ObjectSystem.Object
TransactionTestBase<TTestStore, TFixture>TransactionTestBase(Of TTestStore, TFixture)
Implements
System.IDisposableSystem.IDisposable

Constructors

TransactionTestBase(TFixture) TransactionTestBase(TFixture)

protected TransactionTestBase(TFixture fixture)
Protected Sub New(fixture As TFixture)
Parameters
fixture
TFixture TFixture

Properties

DirtyReadsOccur DirtyReadsOccur

protected virtual bool DirtyReadsOccur { get; }
Protected Overridable ReadOnly Property DirtyReadsOccur As Boolean
Value
System.Boolean System.Boolean

Fixture Fixture

protected TFixture Fixture { get; set; }
Protected Property Fixture As TFixture
Value
TFixture TFixture

SnapshotSupported SnapshotSupported

protected abstract bool SnapshotSupported { get; }
Protected MustOverride ReadOnly Property SnapshotSupported As Boolean
Value
System.Boolean System.Boolean

TestDatabase TestDatabase

protected TTestStore TestDatabase { get; set; }
Protected Property TestDatabase As TTestStore
Value
TTestStore TTestStore

Methods

AssertStoreInitialState() AssertStoreInitialState()

protected virtual void AssertStoreInitialState()
Protected Overridable Sub AssertStoreInitialState

Can_use_open_connection_with_started_transaction(Boolean) Can_use_open_connection_with_started_transaction(Boolean)

public virtual Task Can_use_open_connection_with_started_transaction(bool autoTransaction)
Public Overridable Function Can_use_open_connection_with_started_transaction(autoTransaction As Boolean) As Task
Parameters
autoTransaction
System.Boolean System.Boolean
Returns
System.Threading.Tasks.Task System.Threading.Tasks.Task

CreateContext() CreateContext()

protected DbContext CreateContext()
Protected Function CreateContext As DbContext
Returns

CreateContext(DbConnection) CreateContext(DbConnection)

protected DbContext CreateContext(DbConnection connection)
Protected Function CreateContext(connection As DbConnection) As DbContext
Parameters
connection
System.Data.Common.DbConnection System.Data.Common.DbConnection
Returns

Dispose() Dispose()

public virtual void Dispose()
Public Overridable Sub Dispose

EnsureInitialState() EnsureInitialState()

protected virtual void EnsureInitialState()
Protected Overridable Sub EnsureInitialState

Query_uses_explicit_transaction(Boolean) Query_uses_explicit_transaction(Boolean)

public virtual void Query_uses_explicit_transaction(bool autoTransaction)
Public Overridable Sub Query_uses_explicit_transaction(autoTransaction As Boolean)
Parameters
autoTransaction
System.Boolean System.Boolean

QueryAsync_uses_explicit_transaction(Boolean) QueryAsync_uses_explicit_transaction(Boolean)

public virtual Task QueryAsync_uses_explicit_transaction(bool autoTransaction)
Public Overridable Function QueryAsync_uses_explicit_transaction(autoTransaction As Boolean) As Task
Parameters
autoTransaction
System.Boolean System.Boolean
Returns
System.Threading.Tasks.Task System.Threading.Tasks.Task

RelationalTransaction_can_be_commited(Boolean) RelationalTransaction_can_be_commited(Boolean)

public virtual Task RelationalTransaction_can_be_commited(bool autoTransaction)
Public Overridable Function RelationalTransaction_can_be_commited(autoTransaction As Boolean) As Task
Parameters
autoTransaction
System.Boolean System.Boolean
Returns
System.Threading.Tasks.Task System.Threading.Tasks.Task

RelationalTransaction_can_be_commited_from_context(Boolean) RelationalTransaction_can_be_commited_from_context(Boolean)

public virtual Task RelationalTransaction_can_be_commited_from_context(bool autoTransaction)
Public Overridable Function RelationalTransaction_can_be_commited_from_context(autoTransaction As Boolean) As Task
Parameters
autoTransaction
System.Boolean System.Boolean
Returns
System.Threading.Tasks.Task System.Threading.Tasks.Task

RelationalTransaction_can_be_rolled_back(Boolean) RelationalTransaction_can_be_rolled_back(Boolean)

public virtual Task RelationalTransaction_can_be_rolled_back(bool autoTransaction)
Public Overridable Function RelationalTransaction_can_be_rolled_back(autoTransaction As Boolean) As Task
Parameters
autoTransaction
System.Boolean System.Boolean
Returns
System.Threading.Tasks.Task System.Threading.Tasks.Task

RelationalTransaction_can_be_rolled_back_from_context(Boolean) RelationalTransaction_can_be_rolled_back_from_context(Boolean)

public virtual Task RelationalTransaction_can_be_rolled_back_from_context(bool autoTransaction)
Public Overridable Function RelationalTransaction_can_be_rolled_back_from_context(autoTransaction As Boolean) As Task
Parameters
autoTransaction
System.Boolean System.Boolean
Returns
System.Threading.Tasks.Task System.Threading.Tasks.Task

SaveChanges_can_be_used_with_no_transaction() SaveChanges_can_be_used_with_no_transaction()

public virtual void SaveChanges_can_be_used_with_no_transaction()
Public Overridable Sub SaveChanges_can_be_used_with_no_transaction

SaveChanges_false_uses_explicit_transaction_without_committing_or_accepting_changes(Boolean) SaveChanges_false_uses_explicit_transaction_without_committing_or_accepting_changes(Boolean)

public virtual void SaveChanges_false_uses_explicit_transaction_without_committing_or_accepting_changes(bool autoTransaction)
Public Overridable Sub SaveChanges_false_uses_explicit_transaction_without_committing_or_accepting_changes(autoTransaction As Boolean)
Parameters
autoTransaction
System.Boolean System.Boolean

SaveChanges_implicitly_starts_transaction() SaveChanges_implicitly_starts_transaction()

public virtual void SaveChanges_implicitly_starts_transaction()
Public Overridable Sub SaveChanges_implicitly_starts_transaction

SaveChanges_uses_explicit_transaction_and_does_not_rollback_on_failure(Boolean) SaveChanges_uses_explicit_transaction_and_does_not_rollback_on_failure(Boolean)

public virtual void SaveChanges_uses_explicit_transaction_and_does_not_rollback_on_failure(bool autoTransaction)
Public Overridable Sub SaveChanges_uses_explicit_transaction_and_does_not_rollback_on_failure(autoTransaction As Boolean)
Parameters
autoTransaction
System.Boolean System.Boolean

SaveChanges_uses_explicit_transaction_without_committing(Boolean) SaveChanges_uses_explicit_transaction_without_committing(Boolean)

public virtual void SaveChanges_uses_explicit_transaction_without_committing(bool autoTransaction)
Public Overridable Sub SaveChanges_uses_explicit_transaction_without_committing(autoTransaction As Boolean)
Parameters
autoTransaction
System.Boolean System.Boolean

SaveChangesAsync_can_be_used_with_no_transaction() SaveChangesAsync_can_be_used_with_no_transaction()

public virtual Task SaveChangesAsync_can_be_used_with_no_transaction()
Public Overridable Function SaveChangesAsync_can_be_used_with_no_transaction As Task
Returns
System.Threading.Tasks.Task System.Threading.Tasks.Task

SaveChangesAsync_false_uses_explicit_transaction_without_committing_or_accepting_changes(Boolean) SaveChangesAsync_false_uses_explicit_transaction_without_committing_or_accepting_changes(Boolean)

public virtual Task SaveChangesAsync_false_uses_explicit_transaction_without_committing_or_accepting_changes(bool autoTransaction)
Public Overridable Function SaveChangesAsync_false_uses_explicit_transaction_without_committing_or_accepting_changes(autoTransaction As Boolean) As Task
Parameters
autoTransaction
System.Boolean System.Boolean
Returns
System.Threading.Tasks.Task System.Threading.Tasks.Task

SaveChangesAsync_implicitly_starts_transaction() SaveChangesAsync_implicitly_starts_transaction()

public virtual Task SaveChangesAsync_implicitly_starts_transaction()
Public Overridable Function SaveChangesAsync_implicitly_starts_transaction As Task
Returns
System.Threading.Tasks.Task System.Threading.Tasks.Task

SaveChangesAsync_uses_explicit_transaction_and_does_not_rollback_on_failure(Boolean) SaveChangesAsync_uses_explicit_transaction_and_does_not_rollback_on_failure(Boolean)

public virtual Task SaveChangesAsync_uses_explicit_transaction_and_does_not_rollback_on_failure(bool autoTransaction)
Public Overridable Function SaveChangesAsync_uses_explicit_transaction_and_does_not_rollback_on_failure(autoTransaction As Boolean) As Task
Parameters
autoTransaction
System.Boolean System.Boolean
Returns
System.Threading.Tasks.Task System.Threading.Tasks.Task

SaveChangesAsync_uses_explicit_transaction_without_committing(Boolean) SaveChangesAsync_uses_explicit_transaction_without_committing(Boolean)

public virtual Task SaveChangesAsync_uses_explicit_transaction_without_committing(bool autoTransaction)
Public Overridable Function SaveChangesAsync_uses_explicit_transaction_without_committing(autoTransaction As Boolean) As Task
Parameters
autoTransaction
System.Boolean System.Boolean
Returns
System.Threading.Tasks.Task System.Threading.Tasks.Task

UseTransaction_throws_if_another_transaction_started(Boolean) UseTransaction_throws_if_another_transaction_started(Boolean)

public virtual void UseTransaction_throws_if_another_transaction_started(bool autoTransaction)
Public Overridable Sub UseTransaction_throws_if_another_transaction_started(autoTransaction As Boolean)
Parameters
autoTransaction
System.Boolean System.Boolean

UseTransaction_throws_if_mismatched_connection(Boolean) UseTransaction_throws_if_mismatched_connection(Boolean)

public virtual void UseTransaction_throws_if_mismatched_connection(bool autoTransaction)
Public Overridable Sub UseTransaction_throws_if_mismatched_connection(autoTransaction As Boolean)
Parameters
autoTransaction
System.Boolean System.Boolean

UseTransaction_will_not_dispose_external_transaction(Boolean) UseTransaction_will_not_dispose_external_transaction(Boolean)

public virtual void UseTransaction_will_not_dispose_external_transaction(bool autoTransaction)
Public Overridable Sub UseTransaction_will_not_dispose_external_transaction(autoTransaction As Boolean)
Parameters
autoTransaction
System.Boolean System.Boolean