Table of Contents

Class MasterListRepositoryTest

Namespace
adas_core.Test.Repositories
Assembly
adas-core.Test.dll
[TestFixture]
public class MasterListRepositoryTest
Inheritance
MasterListRepositoryTest
Inherited Members
Extension Methods

Methods

Cleanup()

Performs one-time cleanup after integration test execution by dropping the MasterLists collection from the integration test database to ensure a clean state between test runs.

[OneTimeTearDown]
public Task Cleanup()

Returns

Task

Delete_ShouldDeleteEntity()

Verifies that the repository's Delete operation successfully removes a MasterList entity, ensuring that a subsequent lookup by id returns no result.

[Test]
public Task Delete_ShouldDeleteEntity()

Returns

Task

FindById_ShouldReturnEntity_WhenFound()

Verifies that the repository's FindById method returns the matching entity when a master list with the specified identifier exists in the data store.

[Test]
public Task FindById_ShouldReturnEntity_WhenFound()

Returns

Task

A task representing the asynchronous test execution.

FindById_WithDifferentLocale_ShouldReturnEntity_WhenFound()

[Test]
public Task FindById_WithDifferentLocale_ShouldReturnEntity_WhenFound()

Returns

Task

FindById_WithDifferentLocale_ShouldReturnEntity_WhenFound_AndDefaultLocale()

[Test]
public Task FindById_WithDifferentLocale_ShouldReturnEntity_WhenFound_AndDefaultLocale()

Returns

Task

FindByName_ShouldReturnEntity_WhenFound()

Verifies that the repository's FindByName method returns the matching entity when an entity with the specified name exists in the data store.

[Test]
public Task FindByName_ShouldReturnEntity_WhenFound()

Returns

Task

FindOptionItemByLocaleAndId()

[Test]
public Task FindOptionItemByLocaleAndId()

Returns

Task

GetAll_ShouldReturnAllEntities()

Verifies that the repository's GetAll method returns all entities, ensuring the result contains at least two items.

[Test]
public Task GetAll_ShouldReturnAllEntities()

Returns

Task

GetMasterListByIdAndSearchOptiionsByLocale()

[Test]
public Task GetMasterListByIdAndSearchOptiionsByLocale()

Returns

Task

Init()

Performs one-time initialization for the test fixture by configuring ApiSettings with the expected master list property names, resetting the "MasterLists" collection in the integration database, and creating a MasterListRepository<T> instance for use across tests.

[OneTimeSetUp]
public Task Init()

Returns

Task

InsertOneAsync_ShouldInsertEntity()

Verifies that MasterList entities are correctly persisted in the repository via InsertOneAsync, by inserting an entity and confirming it can be retrieved by its identifier using the default locale.

[Test]
public Task InsertOneAsync_ShouldInsertEntity()

Returns

Task

UpdateMasterListOptionByLocale()

[Test]
public Task UpdateMasterListOptionByLocale()

Returns

Task

Update_ShouldUpdateEntity()

Verifies that the repository's Update method successfully persists changes to an existing MasterList entity, allowing the modified record to be retrieved by its identifier with the updated values.

[Test]
public Task Update_ShouldUpdateEntity()

Returns

Task