test: migrate AdminUI/ControlPlane/Runtime/Host tests to xunit.v3 (#756)
v2-ci / unit-tests (push) Failing after 13m22s
v2-ci / unit-tests (push) Failing after 13m22s
Akka.TestKit.Xunit2 -> Akka.TestKit.Xunit 1.5.62 (xunit.v3 TestKit; needs xunit.v3 3.2.2, set via VersionOverride on the four projects). Removes the xunit 2.9.3 pin. IAsyncLifetime returns ValueTask, SqlServerFactAttribute gains the source-info ctor, and xUnit1051 call sites pass TestContext.Current.CancellationToken. Test counts unchanged. Claude-Session: https://claude.ai/code/session_01GT67AEHd2Acv1YPwGfXEoV
This commit is contained in:
@@ -26,7 +26,7 @@ public sealed class UnsTreeServiceLoadEditTests
|
||||
{
|
||||
var (service, _) = Seeded();
|
||||
|
||||
var dto = await service.LoadAreaAsync("AREA-1");
|
||||
var dto = await service.LoadAreaAsync("AREA-1", TestContext.Current.CancellationToken);
|
||||
|
||||
dto.ShouldNotBeNull();
|
||||
dto.UnsAreaId.ShouldBe("AREA-1");
|
||||
@@ -41,7 +41,7 @@ public sealed class UnsTreeServiceLoadEditTests
|
||||
{
|
||||
var (service, _) = Seeded();
|
||||
|
||||
(await service.LoadAreaAsync("NOPE")).ShouldBeNull();
|
||||
(await service.LoadAreaAsync("NOPE", TestContext.Current.CancellationToken)).ShouldBeNull();
|
||||
}
|
||||
|
||||
/// <summary>Loading a seeded line maps its fields, parent area, and a non-empty RowVersion.</summary>
|
||||
@@ -50,7 +50,7 @@ public sealed class UnsTreeServiceLoadEditTests
|
||||
{
|
||||
var (service, _) = Seeded();
|
||||
|
||||
var dto = await service.LoadLineAsync("LINE-1");
|
||||
var dto = await service.LoadLineAsync("LINE-1", TestContext.Current.CancellationToken);
|
||||
|
||||
dto.ShouldNotBeNull();
|
||||
dto.UnsLineId.ShouldBe("LINE-1");
|
||||
@@ -65,7 +65,7 @@ public sealed class UnsTreeServiceLoadEditTests
|
||||
{
|
||||
var (service, _) = Seeded();
|
||||
|
||||
(await service.LoadLineAsync("NOPE")).ShouldBeNull();
|
||||
(await service.LoadLineAsync("NOPE", TestContext.Current.CancellationToken)).ShouldBeNull();
|
||||
}
|
||||
|
||||
/// <summary>Loading the seeded equipment maps its identity fields, line, and a non-empty RowVersion.</summary>
|
||||
@@ -74,7 +74,7 @@ public sealed class UnsTreeServiceLoadEditTests
|
||||
{
|
||||
var (service, _) = Seeded();
|
||||
|
||||
var dto = await service.LoadEquipmentAsync(UnsTreeTestDb.SeededEquipmentId);
|
||||
var dto = await service.LoadEquipmentAsync(UnsTreeTestDb.SeededEquipmentId, TestContext.Current.CancellationToken);
|
||||
|
||||
dto.ShouldNotBeNull();
|
||||
dto.EquipmentId.ShouldBe(UnsTreeTestDb.SeededEquipmentId);
|
||||
@@ -90,7 +90,7 @@ public sealed class UnsTreeServiceLoadEditTests
|
||||
{
|
||||
var (service, _) = Seeded();
|
||||
|
||||
(await service.LoadEquipmentAsync("NOPE")).ShouldBeNull();
|
||||
(await service.LoadEquipmentAsync("NOPE", TestContext.Current.CancellationToken)).ShouldBeNull();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -129,10 +129,10 @@ public sealed class UnsTreeServiceLoadEditTests
|
||||
DriverType = "S7",
|
||||
DriverConfig = "{}",
|
||||
});
|
||||
await db.SaveChangesAsync();
|
||||
await db.SaveChangesAsync(TestContext.Current.CancellationToken);
|
||||
}
|
||||
|
||||
var drivers = await service.LoadDriversForClusterAsync(UnsTreeTestDb.PopulatedClusterId);
|
||||
var drivers = await service.LoadDriversForClusterAsync(UnsTreeTestDb.PopulatedClusterId, TestContext.Current.CancellationToken);
|
||||
|
||||
drivers.Count.ShouldBe(2);
|
||||
drivers[0].DriverInstanceId.ShouldBe("DRV-A");
|
||||
@@ -151,7 +151,7 @@ public sealed class UnsTreeServiceLoadEditTests
|
||||
{
|
||||
var (service, _) = Seeded();
|
||||
|
||||
var dto = await service.LoadTagAsync("TAG-1");
|
||||
var dto = await service.LoadTagAsync("TAG-1", TestContext.Current.CancellationToken);
|
||||
|
||||
dto.ShouldNotBeNull();
|
||||
dto.TagId.ShouldBe("TAG-1");
|
||||
@@ -170,7 +170,7 @@ public sealed class UnsTreeServiceLoadEditTests
|
||||
{
|
||||
var (service, _) = Seeded();
|
||||
|
||||
(await service.LoadTagAsync("NOPE")).ShouldBeNull();
|
||||
(await service.LoadTagAsync("NOPE", TestContext.Current.CancellationToken)).ShouldBeNull();
|
||||
}
|
||||
|
||||
/// <summary>Loading a seeded virtual tag maps its fields, owning equipment, and a non-empty RowVersion.</summary>
|
||||
@@ -179,7 +179,7 @@ public sealed class UnsTreeServiceLoadEditTests
|
||||
{
|
||||
var (service, _) = Seeded();
|
||||
|
||||
var dto = await service.LoadVirtualTagAsync("VTAG-1");
|
||||
var dto = await service.LoadVirtualTagAsync("VTAG-1", TestContext.Current.CancellationToken);
|
||||
|
||||
dto.ShouldNotBeNull();
|
||||
dto.VirtualTagId.ShouldBe("VTAG-1");
|
||||
@@ -196,6 +196,6 @@ public sealed class UnsTreeServiceLoadEditTests
|
||||
{
|
||||
var (service, _) = Seeded();
|
||||
|
||||
(await service.LoadVirtualTagAsync("NOPE")).ShouldBeNull();
|
||||
(await service.LoadVirtualTagAsync("NOPE", TestContext.Current.CancellationToken)).ShouldBeNull();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user