Skip to content

Refacto/eosu 1007 replace eos config tests with product config-->6.1.0#1263

Draft
OswaldoApexSystems wants to merge 6 commits intorelease-6.1.0from
refacto/EOSU-1007-Replace-EOSConfigTests-with-ProductConfig
Draft

Refacto/eosu 1007 replace eos config tests with product config-->6.1.0#1263
OswaldoApexSystems wants to merge 6 commits intorelease-6.1.0from
refacto/EOSU-1007-Replace-EOSConfigTests-with-ProductConfig

Conversation

@OswaldoApexSystems
Copy link
Copy Markdown
Contributor

EOSU 1007 Update Config/EOSConfigTests.cs
Screenshot 2026-03-27 002928

This change migrates the configuration system from the legacy EOSConfig
model to the new ProductConfig-based architecture.

Key points of this migration:

  • Replaced EOSConfig usage with ProductConfig as the main configuration
    entry point across runtime and tests.
  • Refactored validation logic to rely on strong typing and domain
    invariants instead of string parsing.
  • Introduced dedicated FieldValidators aligned with the new model:
    • GUIDFieldValidatorAttribute for Guid-based fields (rejects Guid.Empty).
    • SandboxIdFieldValidatorAttribute for SandboxId value object validation.
    • ProductionEnvironmentsFieldValidatorAttribute to validate deployment
      aggregates.
    • ClientCredentialsFieldValidatorAttribute to ensure at least one
      complete client credential exists.
  • Removed legacy string-based ID validation patterns in favor of
    semantic validation using Guid, SandboxId, and aggregate state.

Domain model improvements:

  • Deployment validity is now expressed exclusively through domain
    invariants (Deployment.IsComplete) instead of FieldValidator usage.
  • SandboxId was hardened to be null-safe and robust against invalid input,
    preventing runtime exceptions and clarifying the distinction between
    "valid", "invalid", and "empty" states.
  • Validation responsibilities are now clearly split:
    • FieldValidators validate configuration completeness at the
      ProductConfig boundary.
    • Domain objects (Deployment, SandboxId, Credentials) enforce their
      own invariants internally.

Test suite updates:

  • Removed or migrated EOSConfig tests to ProductConfigTests.
  • Added comprehensive test coverage for:
    • ProductConfig fields and validators.
    • ProductionEnvironments and ClientCredentials aggregates.
    • Deployment domain invariants.
    • SandboxId value object behavior, including edge cases, rollback
      behavior, and format semantics.
  • Ensured tests are deterministic by explicitly resetting singleton
    config state between test cases.

Overall, this commit modernizes the configuration system by:

  • Eliminating legacy parsing-based validation.
  • Making invalid states unrepresentable through strong typing.
  • Aligning runtime behavior, validation, and tests around the same
    domain rules.

DanF-ApexSystems and others added 4 commits February 10, 2026 11:05
This change migrates the configuration system from the legacy EOSConfig
model to the new ProductConfig-based architecture.

Key points of this migration:

- Replaced EOSConfig usage with ProductConfig as the main configuration
  entry point across runtime and tests.
- Refactored validation logic to rely on strong typing and domain
  invariants instead of string parsing.
- Introduced dedicated FieldValidators aligned with the new model:
  * GUIDFieldValidatorAttribute for Guid-based fields (rejects Guid.Empty).
  * SandboxIdFieldValidatorAttribute for SandboxId value object validation.
  * ProductionEnvironmentsFieldValidatorAttribute to validate deployment
    aggregates.
  * ClientCredentialsFieldValidatorAttribute to ensure at least one
    complete client credential exists.
- Removed legacy string-based ID validation patterns in favor of
  semantic validation using Guid, SandboxId, and aggregate state.

Domain model improvements:
- Deployment validity is now expressed exclusively through domain
  invariants (Deployment.IsComplete) instead of FieldValidator usage.
- SandboxId was hardened to be null-safe and robust against invalid input,
  preventing runtime exceptions and clarifying the distinction between
  "valid", "invalid", and "empty" states.
- Validation responsibilities are now clearly split:
  * FieldValidators validate configuration completeness at the
    ProductConfig boundary.
  * Domain objects (Deployment, SandboxId, Credentials) enforce their
    own invariants internally.

Test suite updates:
- Removed or migrated EOSConfig tests to ProductConfigTests.
- Added comprehensive test coverage for:
  * ProductConfig fields and validators.
  * ProductionEnvironments and ClientCredentials aggregates.
  * Deployment domain invariants.
  * SandboxId value object behavior, including edge cases, rollback
    behavior, and format semantics.
- Ensured tests are deterministic by explicitly resetting singleton
  config state between test cases.

Overall, this commit modernizes the configuration system by:
- Eliminating legacy parsing-based validation.
- Making invalid states unrepresentable through strong typing.
- Aligning runtime behavior, validation, and tests around the same
  domain rules.
@OswaldoApexSystems OswaldoApexSystems added the unit-testing PRs that introduce additional Unit Testing label Mar 27, 2026
@OswaldoApexSystems OswaldoApexSystems marked this pull request as ready for review March 27, 2026 06:47
@OswaldoApexSystems OswaldoApexSystems requested a review from a team March 27, 2026 06:47
@OswaldoApexSystems OswaldoApexSystems added fix PR contains a fix. removed labels Mar 27, 2026
@OswaldoApexSystems OswaldoApexSystems changed the title Refacto/eosu 1007 replace eos config tests with product config Refacto/eosu 1007 replace eos config tests with product config-->6.1.0 Mar 27, 2026
@OswaldoApexSystems OswaldoApexSystems marked this pull request as draft March 27, 2026 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix PR contains a fix. removed unit-testing PRs that introduce additional Unit Testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants