=== 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
+12
View File
@@ -10,12 +10,14 @@ namespace adas_core.Test.Utilities;
/// <summary>
/// Provides a collection of utility members to support testing operations and helper functionality.
/// </summary>
/// <!-- aidoc:v1 sig=cfa891c -->
public class TestUtilities
{
/// <summary>
/// Creates and returns a fully populated, valid <see cref="PointOfCare"/> instance with predefined test values, typically used as a helper for unit testing or seeding sample data.
/// </summary>
/// <returns>A new <see cref="PointOfCare"/> object initialized with valid identifiers, room and bed information, an available status, a default configuration, and a referenced unit.</returns>
/// <!-- aidoc:v1 sig=154b0c7 body=e5193dc -->
public static PointOfCare CreateValidPointOfCare()
{
return new PointOfCare
@@ -36,6 +38,7 @@ public class TestUtilities
/// Creates a valid <see cref="Discharge"/> instance populated with generated identifiers, current UTC timestamps, and default test values for use in test scenarios.
/// </summary>
/// <returns>A fully populated <see cref="Discharge"/> object with all required fields set to valid values.</returns>
/// <!-- aidoc:v1 sig=37702fe body=ccb1310 -->
public static Discharge CreateValidDischarge()
{
return new Discharge
@@ -59,6 +62,7 @@ public class TestUtilities
/// Creates and returns a new <see cref="Patient"/> instance populated with valid test/default values, including a generated identifier, sample patient numbers, admission timestamp, and related option list entries for discharge status, altable, and origin.
/// </summary>
/// <returns>A fully initialized <see cref="Patient"/> object suitable for use in testing or seeding scenarios.</returns>
/// <!-- aidoc:v1 sig=1ae0cc0 body=cd990fb -->
public static Patient CreateValidPatient()
{
return new Patient
@@ -105,6 +109,7 @@ public class TestUtilities
/// Creates a new <see cref="OptionList"/> instance populated with predefined valid test values, typically used as a helper for unit tests or test data seeding.
/// </summary>
/// <returns>An <see cref="OptionList"/> with sample values, where <c>InitDate</c> is set to the current UTC time and <c>EndDate</c> is set to one day after the current UTC time.</returns>
/// <!-- aidoc:v1 sig=800f5e4 body=81a25fa -->
public static OptionList CreateValidOptionList()
{
return new OptionList
@@ -123,6 +128,7 @@ public class TestUtilities
/// Creates a valid <see cref="PatientLocation"/> instance populated with default test data for use in test scenarios.
/// </summary>
/// <returns>A <see cref="PatientLocation"/> with predefined unit name, bed, and room values.</returns>
/// <!-- aidoc:v1 sig=c28fe25 body=15ca463 -->
private static PatientLocation CreateValidPatientLocation()
{
return new PatientLocation
@@ -137,6 +143,7 @@ public class TestUtilities
/// Creates a new <see cref="Unit"/> instance populated with valid default values, typically used for testing or seeding purposes.
/// </summary>
/// <returns>A new <see cref="Unit"/> object with a generated unique identifier, default title and name, no last update timestamp, an empty list of point of care IDs, an OK status, and a configuration with auto ADT enabled.</returns>
/// <!-- aidoc:v1 sig=ecd91da body=ab80ac1 -->
public static Unit CreateValidUnit()
{
return new Unit
@@ -158,6 +165,7 @@ public class TestUtilities
/// Creates and returns a valid <see cref="Admission"/> instance populated with sample test data, including generated unique identifiers, a test person, option lists for origin, diagnosis, insulation, language barrier, allergies, and a patient location.
/// </summary>
/// <returns>A new <see cref="Admission"/> object fully initialized with valid test values.</returns>
/// <!-- aidoc:v1 sig=2ea4b69 body=37f7713 -->
public static Admission CreateValidAdmission()
{
return new Admission
@@ -195,6 +203,7 @@ public class TestUtilities
/// </summary>
/// <param name="id">The optional identifier for the configuration. If <c>null</c>, a new <see cref="ObjectId"/> is generated.</param>
/// <returns>A newly created <see cref="CardConfig"/> populated with the default valid configuration.</returns>
/// <!-- aidoc:v1 sig=7d0e8fd body=d62f12a -->
public static CardConfig CreateValidCardConfig(ObjectId? id = null)
{
return new CardConfig
@@ -220,6 +229,7 @@ public class TestUtilities
/// </summary>
/// <param name="id">The optional identifier to assign to the configuration. When <c>null</c>, a new <see cref="ObjectId"/> is generated.</param>
/// <returns>A <see cref="CardDetailsConfig"/> populated with the nurse display configuration.</returns>
/// <!-- aidoc:v1 sig=b545d8d body=a2d6d5b -->
public static CardDetailsConfig CreateValidCardDetailsNurseConfig(ObjectId? id = null)
{
return new CardDetailsConfig
@@ -259,6 +269,7 @@ public class TestUtilities
/// </summary>
/// <param name="id">The optional identifier to assign to the configuration. When <c>null</c>, a new <see cref="ObjectId"/> is generated.</param>
/// <returns>A <see cref="CardDetailsConfig"/> configured with a predefined smart section layout.</returns>
/// <!-- aidoc:v1 sig=ea55729 body=77525b6 -->
public static CardDetailsConfig CreateValidCardDetailsSmartConfig(ObjectId? id = null)
{
return new CardDetailsConfig
@@ -301,6 +312,7 @@ public class TestUtilities
/// <param name="idCard">The optional card config identifier. A new <see cref="ObjectId"/> is generated when <c>null</c>.</param>
/// <param name="idDetail">The optional detail config identifier. A new <see cref="ObjectId"/> is generated when <c>null</c>.</param>
/// <returns>A fully populated <see cref="DisplayConfig"/> with default field and hospital values.</returns>
/// <!-- aidoc:v1 sig=8e7f94f body=bd71343 -->
public static DisplayConfig CreateValidDisplayConfig(DisplayConfigEnums.DisplayType type, ObjectId? id,
ObjectId? idCard, ObjectId? idDetail)
{