=== Summary: 675 files | 7 generated | 484 fresh | 4605 untracked | 4268 adopted | 355 marked | 466 validated-ok | 2+0 stale (sig+body) | 0 skipped | 0 failed | elapsed 11:08:11.442 (40091.44s) ===

This commit is contained in:
julian
2026-06-28 02:50:05 -07:00
parent a19fb90902
commit 586f02a2ca
654 changed files with 5260 additions and 0 deletions
@@ -35,6 +35,7 @@ public class PumpStateRepositoryTest
/// "pump_states" MongoDB collection, building the repository indexes, and seeding two initial pump states (one
/// actively infusing for a known patient/device and one not infusing) to verify the baseline document count.
/// </summary>
/// <!-- aidoc:v1 sig=81c0015 body=a2190cd -->
[OneTimeSetUp]
public async Task Init()
{
@@ -89,6 +90,7 @@ public class PumpStateRepositoryTest
/// <summary>
/// Verifies that FindByDeviceIdAsync retrieves the correct infusion state for a given device, returning a non-null result that matches the requested device identifier and reflects the expected infusion status.
/// </summary>
/// <!-- aidoc:v1 sig=e52b862 body=d7db598 -->
[Test]
public async Task FindByDeviceIdAsync_ReturnsCorrectState()
{
@@ -108,6 +110,7 @@ public class PumpStateRepositoryTest
/// <summary>
/// Verifies that <c>UpsertAsync</c> inserts a new <see cref="PumpState"/> record when no existing entry is found for the specified <c>DeviceId</c>, and that the persisted state retains the provided property values.
/// </summary>
/// <!-- aidoc:v1 sig=428a2bd body=4500878 -->
[Test]
public async Task UpsertAsync_InsertsNewWhenNotExists()
{
@@ -131,6 +134,7 @@ public class PumpStateRepositoryTest
/// the updated <see cref="PumpState"/> is persisted and retrievable with the modified <c>IsInfusing</c>,
/// <c>Status</c>, and <c>LastUpdated</c> values.
/// </summary>
/// <!-- aidoc:v1 sig=8838ddb body=654a229 -->
[Test]
public async Task UpsertAsync_UpdatesExistingState()
{
@@ -165,6 +169,7 @@ public class PumpStateRepositoryTest
/// <summary>
/// Verifies that <c>GetAllAsync</c> returns a non-null collection of pump states containing at least two entries, including those associated with the seeded devices A and B.
/// </summary>
/// <!-- aidoc:v1 sig=a469772 body=1e9a940 -->
[Test]
public async Task GetAllAsync_ReturnsAllStates()
{
@@ -190,6 +195,7 @@ public class PumpStateRepositoryTest
/// <summary>
/// Verifies that UpsertAsync updates an existing entity instead of inserting a duplicate, ensuring the total record count remains unchanged when upserting a <see cref="PumpState"/> for an already-known device identifier.
/// </summary>
/// <!-- aidoc:v1 sig=0293756 body=e6aaf62 -->
[Test]
public async Task UpsertAsync_DoesNotCreateDuplicates()
{