Table of Contents

Class TreatmentRepositoryTest

Namespace
adas_core.Test.Repositories
Assembly
adas-core.Test.dll
[TestFixture]
[Category("Integration")]
public class TreatmentRepositoryTest
Inheritance
TreatmentRepositoryTest
Inherited Members
Extension Methods

Methods

DeleteAsync()

Verifies that DeleteAsync() successfully removes a persisted patient treatment from the repository. The test inserts a treatment, confirms it exists, deletes it by id, and asserts it is no longer retrievable.

[Test]
public Task DeleteAsync()

Returns

Task

DeleteByPatientId()

Verifies that DeleteByPatientId() removes the patient treatment associated with the given patient identifier, ensuring no records remain for that patient after deletion.

[Test]
public Task DeleteByPatientId()

Returns

Task

FindBolusTreatments_Find_Return_Treatment()

Verifies that _repository.FindBolusTreatments returns a non-null collection containing exactly one bolus treatment for the specified patient.

[Test]
public Task FindBolusTreatments_Find_Return_Treatment()

Returns

Task

FindByPatientIdAsync_Find_Return_List_Traetments()

Verifies that FindByPatientIdAsync returns a non-null list containing the expected number of treatments for the specified patient.

[Test]
public Task FindByPatientIdAsync_Find_Return_List_Traetments()

Returns

Task

FindByPatientId_Find_Return_List_Traetments()

Verifies that FindByPatientIdAsync returns a non-null list containing the expected number of treatments for the specified patient.

[Test]
public Task FindByPatientId_Find_Return_List_Traetments()

Returns

Task

GetByPatientId_Find_Return_Null()

Tests that the repository's GetByPatientId method returns the expected patient treatment records for the given patient, verifying that the result is not null and contains the expected number of entries.

[Test]
public Task GetByPatientId_Find_Return_Null()

Returns

Task

GetByPatientId_Not_Find_Return_Null()

Verifies that GetByPatientId returns an empty result collection rather than null when no patient treatments are found for the supplied patient identifier.

[Test]
public Task GetByPatientId_Not_Find_Return_Null()

Returns

Task

Init()

One-time test setup that resets the treatments collection, instantiates the repository, and seeds two patient treatments (one with OrderControlType.Nw and one with OrderControlType.Dc) to verify insert behavior.

[OneTimeSetUp]
public Task Init()

Returns

Task