Class RecordingAlertRepositoryTest
- Namespace
- adas_core.Test.Repositories
- Assembly
- adas-core.Test.dll
[TestFixture]
[Category("Integration")]
public class RecordingAlertRepositoryTest
- Inheritance
-
RecordingAlertRepositoryTest
- Inherited Members
- Extension Methods
Methods
DeleteAsync()
Verifies that the repository's DeleteAsync method successfully removes a PatientRecordingAlert document, confirming the record exists prior to deletion and is no longer retrievable afterwards.
[Test]
public Task DeleteAsync()
Returns
DeleteByPatientId()
Verifies that DeleteByPatientId removes a patient's recording alert from the repository, ensuring the alert cannot be retrieved after deletion.
[Test]
public Task DeleteByPatientId()
Returns
DeleteOlderDaysAsync()
Tests that the DeleteOlderDaysAsync repository method removes patient recording alerts that exceed the specified age threshold and match the given recording name, while preserving alerts within the threshold.
[Test]
public Task DeleteOlderDaysAsync()
Returns
DeleteOlderNumberAsync()
Verifies that DeleteOlderNumberAsync removes older records with the specified name, keeping only the most recent ones according to the provided count.
Inserts two PatientRecordingAlert entries sharing the same name but different timestamps, asserts both exist, performs the deletion, and confirms that only one record remains.
[Test]
public Task DeleteOlderNumberAsync()
Returns
FindByPatientIdAsync()
Verifies that the repository returns a non-null result when searching for records by patient identifier.
[Test]
public Task FindByPatientIdAsync()
Returns
FindLastObservations()
Verifies that FindLastObservations returns only the most recent recording alert
for a given patient and recording name, filtering out older entries based on the
specified count limit, and that the returned observation matches the expected time.
[Test]
public Task FindLastObservations()
Returns
Init()
One-time test setup that initializes the recording alert repository with two sample patient recording alerts and ensures the underlying collection contains exactly two documents for integration test scenarios.
[OneTimeSetUp]
public Task Init()
Returns
UpdateManyObjectId()
Tests the repository's ability to update the patientid ObjectId field across records, verifying that after the update the original patient identifier no longer returns any alerts while the new patient identifier does, and that deletion by patient ID subsequently removes the record.
[Test]
public Task UpdateManyObjectId()