Refactor campaign payload loading

This commit is contained in:
2026-04-01 23:06:46 +02:00
parent 1c8cb71cb4
commit 8561c6643a
19 changed files with 246 additions and 152 deletions

View File

@@ -96,7 +96,7 @@ public sealed class ServiceCampaignTests
}
[Fact]
public void GetCampaign_ForNonGmParticipant_ReturnsCampaignCharactersAndSkills()
public void GetCampaignAndCharacterSheet_ForNonGmParticipant_ReturnCampaignRosterAndSheet()
{
using var harness = ServiceTestSupport.CreateHarness();
var service = harness.Service;
@@ -120,7 +120,11 @@ public sealed class ServiceCampaignTests
Assert.Equal(2, ownerView.Characters.Count);
Assert.Contains(ownerView.Characters, character => character.Id == ownerCharacter.Id);
Assert.Contains(ownerView.Characters, character => character.Id == otherCharacter.Id);
Assert.Equal(2, ownerView.Skills.Count);
Assert.Contains(ownerView.Skills, skill => skill.Id == ownerSkill.Id);
var ownerSheet = ServiceTestSupport.GetValue(service.GetCharacterSheet(ownerSession, ownerCharacter.Id));
var otherSheet = ServiceTestSupport.GetValue(service.GetCharacterSheet(ownerSession, otherCharacter.Id));
Assert.Single(ownerSheet.Skills);
Assert.Contains(ownerSheet.Skills, skill => skill.Id == ownerSkill.Id);
Assert.Single(otherSheet.Skills);
}
}