Remove useless resolves from a buncha tests.

This commit is contained in:
Vera Aguilera Puerto
2021-12-08 12:43:38 +01:00
parent 32416334c4
commit 2699540526
30 changed files with 189 additions and 184 deletions

View File

@@ -159,7 +159,7 @@ namespace Content.IntegrationTests.Tests.GameObjects.Components.Mobs
{
var playerEnt = serverPlayerManager.Sessions.Single().AttachedEntity.GetValueOrDefault();
Assert.That(playerEnt, Is.Not.EqualTo(default));
var actionsComponent = IoCManager.Resolve<IEntityManager>().GetComponent<ServerActionsComponent>(playerEnt);
var actionsComponent = sEntities.GetComponent<ServerActionsComponent>(playerEnt);
actionsComponent.Revoke(ActionType.DebugInstant);
});
@@ -170,7 +170,7 @@ namespace Content.IntegrationTests.Tests.GameObjects.Components.Mobs
{
var local = clientPlayerMgr.LocalPlayer;
var controlled = local!.ControlledEntity;
var actionsComponent = IoCManager.Resolve<IEntityManager>().GetComponent<ClientActionsComponent>(controlled!.Value);
var actionsComponent = cEntities.GetComponent<ClientActionsComponent>(controlled!.Value);
// we should have our innate actions, but debug1 should be revoked
foreach (var innateAction in innateActions)

View File

@@ -59,7 +59,7 @@ namespace Content.IntegrationTests.Tests.GameObjects.Components.Movement
// Now let's make the player enter a climbing transitioning state.
climbing.IsClimbing = true;
climbing.TryMoveTo(IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(human).WorldPosition, IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(table).WorldPosition);
climbing.TryMoveTo(entityManager.GetComponent<TransformComponent>(human).WorldPosition, entityManager.GetComponent<TransformComponent>(table).WorldPosition);
var body = entityManager.GetComponent<IPhysBody>(human);
// TODO: Check it's climbing