Skip to content

test: license-free .NET wire-contract tests for guest auth models#23

Merged
Taure merged 1 commit into
mainfrom
feat/guest-auth-net-tests
Jul 14, 2026
Merged

test: license-free .NET wire-contract tests for guest auth models#23
Taure merged 1 commit into
mainfrom
feat/guest-auth-net-tests

Conversation

@Taure

@Taure Taure commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #21 (guest auth). #21 merged before this test commit landed, so these tests never made it onto main - this PR adds them.

Why

The Unity CI jobs (PlayMode smoke, EditMode) are skipped in this repo because there is no UNITY_LICENSE, so the guest auth added in #21 has no automated coverage in CI. This adds coverage to the one job that DOES run without a license: the standalone .NET test project (Tests/AsobiCore.NET).

What

  • Includes Runtime/Models/AuthModels.cs in the .NET test project.
  • AuthModelsTests.cs: pins the guest wire contract - GuestRequest -> {device_id, device_secret}, GuestUpgradeRequest -> {username, password}, and AuthResponse parsing of the created / guest / upgraded flags (create vs resume vs upgrade), including that absent flags default to false.

At runtime the SDK serializes with UnityEngine.JsonUtility, which maps public fields to their literal names. System.Text.Json with IncludeFields reproduces that mapping for these flat POCOs, so a field rename fails the build the same way it would break the wire.

Local validation

dotnet test Tests/AsobiCore.NET -> 40 passed, 0 failed (35 existing dispatch tests + 5 new). Runs headless, no Unity license, no backend.

@Taure
Taure merged commit ebdc27f into main Jul 14, 2026
3 checks passed
@Taure
Taure deleted the feat/guest-auth-net-tests branch July 14, 2026 19:20
Taure added a commit that referenced this pull request Jul 14, 2026
…24)

Tests/Runtime/README.md still described only the 3 canonical scenarios
and RunsCanonicalFlow. #21 added the RunsGuestFlow smoke leg and #23
added the license-free AsobiCore.NET AuthModelsTests; document both and
correct the CI-status note (the .NET job does run without a license).
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