using Microsoft.Extensions.DependencyInjection; using NUnit.Framework; using SVSim.Database; using SVSim.Database.Repositories.Viewer; using SVSim.UnitTests.Infrastructure; namespace SVSim.UnitTests.Repositories; public class ViewerRepositoryTutorialDefaultTests { [Test] public async Task RegisterAnonymousViewer_starts_at_tutorial_step_0() { using var factory = new SVSimTestFactory(); using var scope = factory.Services.CreateScope(); var repo = scope.ServiceProvider.GetRequiredService(); var viewer = await repo.RegisterAnonymousViewer(Guid.NewGuid()); Assert.That(viewer.MissionData.TutorialState, Is.EqualTo(0), "Fresh signups must start at PRE_TUTORIAL_STEP=0 so the client triggers the tutorial flow. " + "Tests that want a pre-completed tutorial should use SeedViewerAsync (which defaults to 100)."); } }