Show / Hide Table of Contents

Class AzureTableRepositoryTests<TContext, TEntity, TRepository>

Base class for providing a baseline set of tests covering operations common to all AzureTable-backed repositories, along with infrastructure to build additional special-purpose tests to cover any extended repository-specific additions.

Inheritance
System.Object
RepositoryTests<Microsoft.Azure.Cosmos.Table.ITableEntity, TEntity, TRepository>
AzureTableRepositoryTests<TContext, TEntity, TRepository>
Inherited Members
RepositoryTests<ITableEntity, TEntity, TRepository>.TheFixture
RepositoryTests<ITableEntity, TEntity, TRepository>.Sut
RepositoryTests<ITableEntity, TEntity, TRepository>.SetUp()
RepositoryTests<ITableEntity, TEntity, TRepository>.SetUp_Impl()
RepositoryTests<ITableEntity, TEntity, TRepository>.CompleteUnitOfWorkAsync()
RepositoryTests<ITableEntity, TEntity, TRepository>.FreezeDependencies(IFixture)
RepositoryTests<ITableEntity, TEntity, TRepository>.NewEntity()
RepositoryTests<ITableEntity, TEntity, TRepository>.NullifyKeyFields(TEntity)
RepositoryTests<ITableEntity, TEntity, TRepository>.ModifyEntity(TEntity)
RepositoryTests<ITableEntity, TEntity, TRepository>.AssertEntitiesAreEquivalent(TEntity, TEntity)
RepositoryTests<ITableEntity, TEntity, TRepository>.AssertKeyFieldsNotNull(TEntity)
RepositoryTests<ITableEntity, TEntity, TRepository>.AssertRepositoryHasNumEntities(Int32)
RepositoryTests<ITableEntity, TEntity, TRepository>.NewSimpleKeyFromEntity(TEntity)
RepositoryTests<ITableEntity, TEntity, TRepository>.Add_Sets_Keys()
RepositoryTests<ITableEntity, TEntity, TRepository>.Add_Sets_Keys_Impl()
RepositoryTests<ITableEntity, TEntity, TRepository>.Add_New_Entity_And_Get_RoundTrip()
RepositoryTests<ITableEntity, TEntity, TRepository>.Add_New_Entity_And_Get_RoundTrip_Impl()
RepositoryTests<ITableEntity, TEntity, TRepository>.Add_New_Entity_And_Get_By_Key_RoundTrip()
RepositoryTests<ITableEntity, TEntity, TRepository>.Add_New_Entity_And_Get_By_Key_RoundTrip_Impl()
RepositoryTests<ITableEntity, TEntity, TRepository>.Add_Existing_Entity_And_Get_RoundTrip()
RepositoryTests<ITableEntity, TEntity, TRepository>.Add_Existing_Entity_And_Get_RoundTrip_Impl()
RepositoryTests<ITableEntity, TEntity, TRepository>.Delete_And_Get_RoundTrip()
RepositoryTests<ITableEntity, TEntity, TRepository>.Delete_And_Get_RoundTrip_Impl()
RepositoryTests<ITableEntity, TEntity, TRepository>.Delete_By_Key_And_Get_RoundTrip()
RepositoryTests<ITableEntity, TEntity, TRepository>.Delete_By_Key_And_Get_RoundTrip_Impl()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Ease.Repository.AzureTable.Test
Assembly: Ease.Repository.AzureTable.Test.dll
Syntax
public abstract class AzureTableRepositoryTests<TContext, TEntity, TRepository> : RepositoryTests<ITableEntity, TEntity, TRepository> where TContext : class, IAzureTableRepositoryContext where TEntity : class, ITableEntity, new()
    where TRepository : AzureTableRepository<TContext, TEntity>
Type Parameters
Name Description
TContext

The IAzureTableRepositoryContext wanted by the repository

TEntity

The entity Type managed by the repository

TRepository

The repository Type

Properties

| Improve this Doc View Source

Context

Declaration
protected TContext Context { get; }
Property Value
Type Description
TContext
| Improve this Doc View Source

TestTableNamePrefix

Declaration
protected string TestTableNamePrefix { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

UnitOfWork

Declaration
protected BestEffortUnitOfWork UnitOfWork { get; }
Property Value
Type Description
BestEffortUnitOfWork

Methods

| Improve this Doc View Source

Add_New_Entity_And_List_RoundTrip()

NOTE: For most cases, just implement this as a call to the corresponding base.*_Impl(), and don't forget to apply your test framework's appropriate attributes or other mechanism for decorating test methods.

Declaration
public abstract Task Add_New_Entity_And_List_RoundTrip()
Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

Add_New_Entity_And_List_RoundTrip_Impl()

Declaration
protected virtual Task Add_New_Entity_And_List_RoundTrip_Impl()
Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

AssertKeyFieldsNotNull(TEntity)

Declaration
protected override void AssertKeyFieldsNotNull(TEntity entity)
Parameters
Type Name Description
TEntity entity
Overrides
Ease.Repository.Test.RepositoryTests<Microsoft.Azure.Cosmos.Table.ITableEntity, TEntity, TRepository>.AssertKeyFieldsNotNull(TEntity)
| Improve this Doc View Source

AssertRepositoryHasNumEntities(Int32)

Declaration
protected override void AssertRepositoryHasNumEntities(int num = 0)
Parameters
Type Name Description
System.Int32 num
Overrides
Ease.Repository.Test.RepositoryTests<Microsoft.Azure.Cosmos.Table.ITableEntity, TEntity, TRepository>.AssertRepositoryHasNumEntities(System.Int32)
| Improve this Doc View Source

CompleteUnitOfWorkAsync()

Declaration
protected override Task CompleteUnitOfWorkAsync()
Returns
Type Description
System.Threading.Tasks.Task
Overrides
Ease.Repository.Test.RepositoryTests<Microsoft.Azure.Cosmos.Table.ITableEntity, TEntity, TRepository>.CompleteUnitOfWorkAsync()
| Improve this Doc View Source

FreezeDependencies(IFixture)

Override to explicitly Freeze() any necessary dependencies prior to the Sut being allocated.

Declaration
protected override void FreezeDependencies(IFixture fixture)
Parameters
Type Name Description
AutoFixture.IFixture fixture
Overrides
Ease.Repository.Test.RepositoryTests<Microsoft.Azure.Cosmos.Table.ITableEntity, TEntity, TRepository>.FreezeDependencies(AutoFixture.IFixture)
| Improve this Doc View Source

List_Returns_Empty_For_No_Data()

NOTE: For most cases, just implement this as a call to the corresponding base.*_Impl(), and don't forget to apply your test framework's appropriate attributes or other mechanism for decorating test methods.

Declaration
public abstract void List_Returns_Empty_For_No_Data()
| Improve this Doc View Source

List_Returns_Empty_For_No_Data_Impl()

Declaration
protected virtual void List_Returns_Empty_For_No_Data_Impl()
| Improve this Doc View Source

NullifyKeyFields(TEntity)

Declaration
protected override void NullifyKeyFields(TEntity entity)
Parameters
Type Name Description
TEntity entity
Overrides
Ease.Repository.Test.RepositoryTests<Microsoft.Azure.Cosmos.Table.ITableEntity, TEntity, TRepository>.NullifyKeyFields(TEntity)
| Improve this Doc View Source

PrepareDependenciesForContext(IFixture)

Declaration
protected virtual void PrepareDependenciesForContext(IFixture fixture)
Parameters
Type Name Description
AutoFixture.IFixture fixture
| Improve this Doc View Source

TearDown()

A tear-down step is necessary. NOTE: For most cases, just implement this as a call to the corresponding base.*_Impl(), and don't forget to apply your test framework's appropriate attributes or other mechanism for decorating TearDown methods.

Declaration
public abstract void TearDown()
| Improve this Doc View Source

TearDown_Impl()

Declaration
protected virtual void TearDown_Impl()

Extension Methods

ChangeTrackingExtensions.CurrentState<T>(T)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX