Skip to content

Commit

Permalink
This test is unnecessary. Kill.
Browse files Browse the repository at this point in the history
  • Loading branch information
sleepyyapril committed Dec 17, 2024
1 parent 4cb0c57 commit e59dafc
Showing 1 changed file with 0 additions and 44 deletions.
44 changes: 0 additions & 44 deletions Content.IntegrationTests/Tests/Station/StationJobsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -203,50 +203,6 @@ await server.WaitAssertion(() =>
});
await pair.CleanReturnAsync();
}

[Test]
public async Task InvalidRoundstartJobsTest()
{
await using var pair = await PoolManager.GetServerClient();
var server = pair.Server;

var prototypeManager = server.ResolveDependency<IPrototypeManager>();
var compFact = server.ResolveDependency<IComponentFactory>();
var name = compFact.GetComponentName<StationJobsComponent>();

await server.WaitAssertion(() =>
{
// invalidJobs contains all the jobs which can't be set for preference:
// i.e. all the jobs that shouldn't be available round-start.
var invalidJobs = new HashSet<string>();
foreach (var job in prototypeManager.EnumeratePrototypes<JobPrototype>())
{
if (!job.SetPreference)
invalidJobs.Add(job.ID);
}

Assert.Multiple(() =>
{
foreach (var gameMap in prototypeManager.EnumeratePrototypes<GameMapPrototype>())
{
foreach (var (stationId, station) in gameMap.Stations)
{
if (!station.StationComponentOverrides.TryGetComponent(name, out var comp))
continue;

foreach (var (job, array) in ((StationJobsComponent) comp).SetupAvailableJobs)
{
Assert.That(array.Length, Is.EqualTo(2));
Assert.That(array[0] is -1 or >= 0);
Assert.That(array[1] is -1 or >= 0);
Assert.That(invalidJobs, Does.Not.Contain(job), $"Station {stationId} contains job prototype {job} which cannot be present roundstart.");
}
}
}
});
});
await pair.CleanReturnAsync();
}
}

internal static class JobExtensions
Expand Down

0 comments on commit e59dafc

Please sign in to comment.