Description
Description
Code duplication was identified between src/Dotnet.Samples.AspNetCore.WebApi/Utilities/PlayerData.cs
and test/Dotnet.Samples.AspNetCore.WebApi.Tests/Utilities/PlayerFakes.cs
. Both files contain nearly identical player data definitions with only minor differences (like using fixed GUIDs versus generating new ones).
This duplication increases maintenance overhead and risk of inconsistencies when player data needs to be updated.
Proposed Solutions
Consider one of the following approaches:
-
Extract a Shared Player Data Module: Consolidate the common player data definitions into a single shared module that both production and test utilities can reference.
-
Reference the Existing Production Data: Update the test utilities to directly reference the production implementation, ensuring a single source of truth.
Context
This issue was identified during a code review of PR #208.
References
- PR discussion: feature/identifiers #208 (comment)