Skip to content

refactor: introduce IKasTransport seam and add wrapper-level client tests#12

Merged
emuuu merged 1 commit into
mainfrom
refactor/transport-seam
Jun 11, 2026
Merged

refactor: introduce IKasTransport seam and add wrapper-level client tests#12
emuuu merged 1 commit into
mainfrom
refactor/transport-seam

Conversation

@emuuu

@emuuu emuuu commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Introduces a transport seam so the action names and parameters the typed wrappers send are finally
unit-testable. Internal-only refactor — no public API change and no transport behaviour change.

Seam

  • New internal IKasTransport (Soap/IKasTransport.cs) with the existing CallAsync(action, params, ct) signature
  • KasSoapTransport implements it; KasClient now depends on IKasTransport
  • DI aliases IKasTransport onto the same KasSoapTransport singleton (no second transport), so the
    shared session token and flood window are preserved

Tests (+52)

  • RecordingKasTransport fake (throws on empty queue → catches forgotten enqueues / extra calls)
  • Contract tests per wrapper group (Account/Mail/DNS/DynDNS) asserting the exact KAS action name, the
    parameter dictionary, and the response mapping — incl. KAS quirks: zone_host trailing-dot, apex
    record_name, record_aux, ddns_login vs dyndns_login, Y/N + tri-state, scalar-id extraction
  • Seam tests: RequestAsync passthrough (incl. token), DI single-instance invariant

Review

  • Passed code review: 0 production findings, 4 test findings (all low/medium) — all applied.

Build / tests

  • net8.0/9.0/10.0: 0 warnings, 0 errors. 227 tests green (net10.0). Working tree clean.

@emuuu emuuu merged commit 2314ddf into main Jun 11, 2026
4 checks passed
@emuuu emuuu deleted the refactor/transport-seam branch June 11, 2026 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant