Purge IoC resolves from integration tests (#17185)

This commit is contained in:
metalgearsloth
2023-06-07 21:08:52 +10:00
committed by GitHub
parent dfdab6c269
commit 559574ccb9
20 changed files with 83 additions and 71 deletions

View File

@@ -70,7 +70,7 @@ namespace Content.IntegrationTests.Tests.Networking
var map = sMapManager.CreateMap();
var player = sPlayerManager.ServerSessions.Single();
serverEnt = sEntityManager.SpawnEntity(null, new MapCoordinates((0, 0), map));
serverComponent = IoCManager.Resolve<IEntityManager>().AddComponent<PredictionTestComponent>(serverEnt);
serverComponent = sEntityManager.AddComponent<PredictionTestComponent>(serverEnt);
// Make client "join game" so they receive game state updates.
player.JoinGame();
@@ -364,7 +364,7 @@ namespace Content.IntegrationTests.Tests.Networking
Assert.That(clientComponent.Foo, Is.True);
}
}
cfg.SetCVar(CVars.NetLogging, log);
await pairTracker.CleanReturnAsync();
}
@@ -432,7 +432,7 @@ namespace Content.IntegrationTests.Tests.Networking
private void HandleMessage(SetFooMessage message, EntitySessionEventArgs args)
{
var component = IoCManager.Resolve<IEntityManager>().GetComponent<PredictionTestComponent>(message.Uid);
var component = EntityManager.GetComponent<PredictionTestComponent>(message.Uid);
var old = component.Foo;
if (Allow)
{