using Azaion.Missions.E2E.Helpers;
namespace Azaion.Missions.E2E.Fixtures;
///
/// Loads fixture_cascade_F3.sql into a freshly-reset DB. The fixture
/// builds a full mission cascade chain (1 mission → 2 waypoints → 2 media →
/// 2 annotations → 2 detection rows + 3 map_objects) so a single
/// DELETE /missions/{id} exercises every dependency table.
///
///
/// The borrowed-schema tables (media, annotations, detection) must exist
/// before the SQL runs — see . The fixture is
/// deliberately destructive (TRUNCATE … CASCADE in the reset step) so it
/// must NOT share state with read-path scenarios; tests using it should
/// live in their own xUnit collection.
///
public sealed class CascadeF3Fixture : IDisposable
{
public static readonly Guid VehicleId =
Guid.Parse("11111111-0000-0000-0000-000000000001");
public static readonly Guid MissionId =
Guid.Parse("22222222-0000-0000-0000-000000000001");
public CascadeF3Fixture()
{
DbResetFixture.ResetDatabase(TestEnvironment.DbSideChannel);
StubSchema.EnsureCreated();
Seeds.Apply(FixtureSql.Load("fixture_cascade_F3"));
}
public void Dispose() { /* Next fixture's reset cleans up. */ }
}