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

Definition

public abstract class OptimisticConcurrencyTestBase<TTestStore, TFixture> : IClassFixture<TFixture>, IDisposable where TTestStore : TestStore where TFixture : F1FixtureBase<TTestStore>, new ()
Public MustInherit Class OptimisticConcurrencyTestBase(Of TTestStore As TestStore, TFixture As {F1FixtureBase(Of TTestStore), New})
    Inherits IClassFixture(Of TFixture)
    Implements IDisposable

Type Parameters

TTestStore
TFixture
Inheritance
System.ObjectSystem.Object
OptimisticConcurrencyTestBase<TTestStore, TFixture>OptimisticConcurrencyTestBase(Of TTestStore, TFixture)
Implements
System.IDisposableSystem.IDisposable

Constructors

OptimisticConcurrencyTestBase(TFixture) OptimisticConcurrencyTestBase(TFixture)

Fields

ClientPodiums ClientPodiums
StorePodiums StorePodiums

Properties

Fixture Fixture
TestStore TestStore

Methods

Adding_the_same_entity_twice_results_in_DbUpdateException() Adding_the_same_entity_twice_results_in_DbUpdateException()
Attempting_to_add_same_relationship_twice_for_many_to_many_results_in_independent_association_exception() Attempting_to_add_same_relationship_twice_for_many_to_many_results_in_independent_association_exception()
Attempting_to_delete_same_relationship_twice_for_many_to_many_results_in_independent_association_exception() Attempting_to_delete_same_relationship_twice_for_many_to_many_results_in_independent_association_exception()
Calling_Reload_on_a_Deleted_entity_makes_the_entity_unchanged(Boolean) Calling_Reload_on_a_Deleted_entity_makes_the_entity_unchanged(Boolean)
Calling_Reload_on_a_Deleted_entity_that_is_not_in_database_detaches_it(Boolean) Calling_Reload_on_a_Deleted_entity_that_is_not_in_database_detaches_it(Boolean)
Calling_Reload_on_a_Detached_entity_makes_the_entity_unchanged(Boolean) Calling_Reload_on_a_Detached_entity_makes_the_entity_unchanged(Boolean)
Calling_Reload_on_a_Detached_entity_that_is_not_in_database_detaches_it(Boolean) Calling_Reload_on_a_Detached_entity_that_is_not_in_database_detaches_it(Boolean)
Calling_Reload_on_a_Modified_entity_makes_the_entity_unchanged(Boolean) Calling_Reload_on_a_Modified_entity_makes_the_entity_unchanged(Boolean)
Calling_Reload_on_a_Modified_entity_that_is_not_in_database_detaches_it(Boolean) Calling_Reload_on_a_Modified_entity_that_is_not_in_database_detaches_it(Boolean)
Calling_Reload_on_an__Added_entity_that_is_not_in_database_is_no_op(Boolean) Calling_Reload_on_an__Added_entity_that_is_not_in_database_is_no_op(Boolean)
Calling_Reload_on_an_Added_entity_that_was_saved_elsewhere_makes_the_entity_unchanged(Boolean) Calling_Reload_on_an_Added_entity_that_was_saved_elsewhere_makes_the_entity_unchanged(Boolean)
Calling_Reload_on_an_Unchanged_entity_makes_the_entity_unchanged(Boolean) Calling_Reload_on_an_Unchanged_entity_makes_the_entity_unchanged(Boolean)
Calling_Reload_on_an_Unchanged_entity_that_is_not_in_database_detaches_it(Boolean) Calling_Reload_on_an_Unchanged_entity_that_is_not_in_database_detaches_it(Boolean)
Change_in_independent_association_after_change_in_different_concurrency_token_results_in_independent_association_exception() Change_in_independent_association_after_change_in_different_concurrency_token_results_in_independent_association_exception()
Change_in_independent_association_results_in_independent_association_exception() Change_in_independent_association_results_in_independent_association_exception()
Concurrency_issue_where_a_complex_type_nested_member_is_the_concurrency_token_can_be_handled() Concurrency_issue_where_a_complex_type_nested_member_is_the_concurrency_token_can_be_handled()
Concurrency_issue_where_the_FK_is_the_concurrency_token_can_be_handled() Concurrency_issue_where_the_FK_is_the_concurrency_token_can_be_handled()
ConcurrencyTestAsync(Action<F1Context>, Action<F1Context>, Action<F1Context, DbUpdateException>, Action<F1Context>) ConcurrencyTestAsync(Action(Of F1Context), Action(Of F1Context), Action(Of F1Context, DbUpdateException), Action(Of F1Context))

Runs the two actions with two different contexts and calling SaveChanges such that storeChange will succeed and the store will reflect this change, and then clientChange will result in a concurrency exception. After the exception is caught the resolver action is called, after which SaveChanges is called again. Finally, a new context is created and the validator is called so that the state of the database at the end of the process can be validated.

CreateF1Context() CreateF1Context()
Deleting_the_same_entity_twice_results_in_DbUpdateConcurrencyException() Deleting_the_same_entity_twice_results_in_DbUpdateConcurrencyException()
Deleting_then_updating_the_same_entity_results_in_DbUpdateConcurrencyException() Deleting_then_updating_the_same_entity_results_in_DbUpdateConcurrencyException()
Deleting_then_updating_the_same_entity_results_in_DbUpdateConcurrencyException_which_can_be_resolved_with_store_values() Deleting_then_updating_the_same_entity_results_in_DbUpdateConcurrencyException_which_can_be_resolved_with_store_values()
Dispose() Dispose()
Nullable_client_side_concurrency_token_can_be_used() Nullable_client_side_concurrency_token_can_be_used()
ResolveConcurrencyTokens(EntityEntry) ResolveConcurrencyTokens(EntityEntry)
Simple_concurrency_exception_can_be_resolved_with_client_values() Simple_concurrency_exception_can_be_resolved_with_client_values()
Simple_concurrency_exception_can_be_resolved_with_new_values() Simple_concurrency_exception_can_be_resolved_with_new_values()
Simple_concurrency_exception_can_be_resolved_with_store_values() Simple_concurrency_exception_can_be_resolved_with_store_values()
Simple_concurrency_exception_can_be_resolved_with_store_values_using_equivalent_of_accept_changes() Simple_concurrency_exception_can_be_resolved_with_store_values_using_equivalent_of_accept_changes()
Simple_concurrency_exception_can_be_resolved_with_store_values_using_Reload() Simple_concurrency_exception_can_be_resolved_with_store_values_using_Reload()
Two_concurrency_issues_in_one_to_many_related_entities_can_be_handled_by_dealing_with_dependent_first() Two_concurrency_issues_in_one_to_many_related_entities_can_be_handled_by_dealing_with_dependent_first()
Two_concurrency_issues_in_one_to_one_related_entities_can_be_handled_by_dealing_with_dependent_first() Two_concurrency_issues_in_one_to_one_related_entities_can_be_handled_by_dealing_with_dependent_first()
Updating_then_deleting_the_same_entity_results_in_DbUpdateConcurrencyException() Updating_then_deleting_the_same_entity_results_in_DbUpdateConcurrencyException()
Updating_then_deleting_the_same_entity_results_in_DbUpdateConcurrencyException_which_can_be_resolved_with_store_values() Updating_then_deleting_the_same_entity_results_in_DbUpdateConcurrencyException_which_can_be_resolved_with_store_values()
UseTransaction(DatabaseFacade, IDbContextTransaction) UseTransaction(DatabaseFacade, IDbContextTransaction)