Class DischargeRepositoryTest
- Namespace
- adas_core.Test.Repositories
- Assembly
- adas-core.Test.dll
[TestFixture]
[Category("Integration")]
public class DischargeRepositoryTest
- Inheritance
-
DischargeRepositoryTest
- Inherited Members
- Extension Methods
Methods
Delete_ShouldDeleteDischarge()
Verifies that the Delete repository operation removes a discharge so that subsequent lookups by its identifier return no result.
[Test]
public Task Delete_ShouldDeleteDischarge()
Returns
FindAll_ReturnsAllDischarges()
Verifies that the repository's FindAll method returns all discharge records previously inserted via InsertManyAsync, returning a non-null, non-empty collection whose count matches the number of inserted records.
[Test]
public Task FindAll_ReturnsAllDischarges()
Returns
FindByDestination_ExistingDestination_ReturnsDischarges()
Verifies that the discharge repository's FindByDestination method returns the matching discharge records when queried with an existing destination.
[Test]
public Task FindByDestination_ExistingDestination_ReturnsDischarges()
Returns
FindByDestination_NonExistentDestination_ReturnsEmptyList()
Verifies that FindByDestination returns an empty collection when the provided destination does not match any stored discharge records.
[Test]
public Task FindByDestination_NonExistentDestination_ReturnsEmptyList()
Returns
FindById_ExistingId_ReturnsDischarge()
Verifies that the repository's FindById method returns the matching Discharge document when queried with an existing identifier.
[Test]
public Task FindById_ExistingId_ReturnsDischarge()
Returns
FindById_NonExistentId_ReturnsNull()
Verifies that the discharge repository's FindById method returns null when queried with a non-existent MongoDB.Bson.ObjectId.
[Test]
public Task FindById_NonExistentId_ReturnsNull()
Returns
FindByPoCId_ExistingPoCId_ReturnsDischarges()
Verifies that FindByPoCId(ObjectId) returns the matching discharge when a discharge is associated with the supplied point-of-care identifier.
[Test]
public Task FindByPoCId_ExistingPoCId_ReturnsDischarges()
Returns
FindByPoCId_NonExistentPoCId_ReturnsEmptyList()
Verifies that the discharge repository's FindByPoCId method returns an empty list when queried with a non-existent PoCId.
[Test]
public Task FindByPoCId_NonExistentPoCId_ReturnsEmptyList()
Returns
FindByService_ExistingService_ReturnsDischarges()
Verifies that FindByService(string) returns the matching discharge record when a previously inserted discharge exists for the specified service name.
[Test]
public Task FindByService_ExistingService_ReturnsDischarges()
Returns
FindByService_NonExistentService_ReturnsEmptyList()
Verifies that FindByService returns an empty list when queried with a service name that does not exist in the repository.
[Test]
public Task FindByService_NonExistentService_ReturnsEmptyList()
Returns
GetByPatientId_ExistingPatientId_ReturnsDischarge()
Verifies that GetByPatientId returns the matching Discharge record
when a discharge exists for the specified patient identifier.
[Test]
public Task GetByPatientId_ExistingPatientId_ReturnsDischarge()
Returns
GetByPatientId_NonExistentPatientId_ReturnsNull()
Verifies that the GetByPatientId(ObjectId) repository method returns null
when called with a patient ID that does not exist in the data store.
[Test]
public Task GetByPatientId_NonExistentPatientId_ReturnsNull()
Returns
GetDischargeByLocation_NonExistentLocation_ReturnsNull()
Verifies that GetDischargeByLocation returns null when queried with a location
that does not exist in the repository.
[Test]
public Task GetDischargeByLocation_NonExistentLocation_ReturnsNull()
Returns
GetDischargeByPointOfCareId_ExistingId_ReturnsDischarge()
Verifies that GetDischargeByPointOfCareId returns the matching Discharge when queried with a point of care ID that already exists in the repository.
[Test]
public Task GetDischargeByPointOfCareId_ExistingId_ReturnsDischarge()
Returns
GetDischargeByPointOfCareId_NonExistentId_ReturnsNull()
Verifies that GetDischargeByPointOfCareId returns null when called with a non-existent point of care ID.
[Test]
public Task GetDischargeByPointOfCareId_NonExistentId_ReturnsNull()
Returns
Init()
Performs one-time test setup for discharge integration tests by initializing API settings, dropping and recreating the "discharge" collection in the integration database, and instantiating the DischargeRepository.
[OneTimeSetUp]
public Task Init()
Returns
InsertOneAsync_ShouldInsertDischarge()
Verifies that InsertOneAsync successfully persists a discharge document and that the
inserted record can be retrieved by its identifier.
[Test]
public Task InsertOneAsync_ShouldInsertDischarge()
Returns
Update_DischargeSuccessfullyUpdated()
Verifies that an existing discharge record is successfully updated in the repository with new field values.
[Test]
public Task Update_DischargeSuccessfullyUpdated()