Class AdmissionRepositoryTest
- Namespace
- adas_core.Test.Repositories
- Assembly
- adas-core.Test.dll
[TestFixture]
[Category("Integration")]
public class AdmissionRepositoryTest
- Inheritance
-
AdmissionRepositoryTest
- Inherited Members
- Extension Methods
Methods
Delete_Success()
Verifies that the repository successfully deletes an admission record, ensuring that the deleted admission can no longer be retrieved by its identifier.
[Test]
public Task Delete_Success()
Returns
FindAll_Success()
Verifies that the repository's FindAll operation successfully retrieves all admissions, returning a non-empty collection of exactly three records.
[Test]
public Task FindAll_Success()
Returns
FindByDiagnosis_NoMatch()
Verifies that AdmissionRepository.FindByDiagnosis returns an empty collection when no entity matches the provided diagnosis.
[Test]
public Task FindByDiagnosis_NoMatch()
Returns
FindByDiagnosis_Success()
Verifies that AdmissionRepository.FindByDiagnosis successfully returns a non-null result when retrieving admissions matching the specified diagnosis value.
[Test]
public Task FindByDiagnosis_Success()
Returns
FindById_NotFound()
Verifies that the repository's FindById method returns null when queried with a non-existing identifier.
[Test]
public Task FindById_NotFound()
Returns
FindById_Success()
Verifies that the repository successfully retrieves an admission by its unique identifier after it has been inserted.
[Test]
public Task FindById_Success()
Returns
FindByNhc_NotFound()
Verifies that AdmissionRepository.FindByNhc returns null when the provided NHC does not exist in the data source.
[Test]
public Task FindByNhc_NotFound()
Returns
FindByNhc_Success()
Verifies that FindByNhc(string) successfully retrieves an admission record from the repository using its NHC identifier. Confirms that the returned record is not null and that the NHC of the retrieved admission matches the one used in the lookup.
[Test]
public Task FindByNhc_Success()
Returns
FindByPointOfCareId_NoMatch()
Verifies that AdmissionRepository.FindByPointOfCareId returns a non-null empty collection when no point of care matches the provided identifier.
[Test]
public Task FindByPointOfCareId_NoMatch()
Returns
FindByPointOfCareId_Success()
Verifies that the repository's FindByPointOfCareId method successfully retrieves the admission matching the specified point of care identifier, returning a single result and excluding admissions associated with different point of care identifiers.
[Test]
public Task FindByPointOfCareId_Success()
Returns
GetAdmissionByUnitIdWithOutPoC_NoMatch()
Verifies that GetAdmissionByUnitIdWithOutPoC returns an empty result set (instead of null) when no admissions match the provided unit identifier.
[Test]
public Task GetAdmissionByUnitIdWithOutPoC_NoMatch()
Returns
GetAdmissionByUnitIdWithOutPoC_Success()
Tests that the repository's GetAdmissionByUnitIdWithOutPoC method returns only the admissions matching the specified unit identifier
while excluding admissions that have an associated point-of-care identifier.
[Test]
public Task GetAdmissionByUnitIdWithOutPoC_Success()
Returns
Init()
Initializes the integration test environment by resetting the admissions collection and seeding it with valid admission records to be used across the test fixture.
[OneTimeSetUp]
public Task Init()
Returns
InsertOneAsyncAndReturn_Success()
Verifies that inserting a valid admission through the repository returns the same admission and persists it so it can be retrieved by its identifier.
[Test]
public Task InsertOneAsyncAndReturn_Success()
Returns
InsertOneAsync_Success()
Verifies that InsertOneAsync(Admission) successfully persists a valid admission so that it can subsequently be retrieved by its identifier.
[Test]
public Task InsertOneAsync_Success()
Returns
UpdateLocation_Success()
Verifies that UpdateLocation(ObjectId, ObjectId) successfully updates the
PointOfCareId of an existing admission to the specified new location identifier
and that the change is persisted in the repository.
[Test]
public Task UpdateLocation_Success()
Returns
UpdatePatient_Success()
Verifies that the repository successfully updates the patient information of an existing admission, ensuring the updated admission can be retrieved and reflects the new patient's details.
[Test]
public Task UpdatePatient_Success()
Returns
Update_Success()
Verifies that Admission updates are persisted successfully by inserting an admission, modifying one of its fields, and asserting that the updated value is retrieved.
[Test]
public Task Update_Success()