diff --git a/Content.IntegrationTests/Tests/EntityTest.cs b/Content.IntegrationTests/Tests/EntityTest.cs index fc8e1b4391..8431b7e8c2 100644 --- a/Content.IntegrationTests/Tests/EntityTest.cs +++ b/Content.IntegrationTests/Tests/EntityTest.cs @@ -272,7 +272,7 @@ namespace Content.IntegrationTests.Tests // We consider only non-audio entities, as some entities will just play sounds when they spawn. int Count(IEntityManager ent) => ent.EntityCount - ent.Count(); - IEnumerable Entities(IEntityManager entMan) => entMan.GetEntities().Where(entMan.HasComponent); + IEnumerable Entities(IEntityManager entMan) => entMan.GetEntities().Where(e => !entMan.HasComponent(e)); await Assert.MultipleAsync(async () => { @@ -312,8 +312,8 @@ namespace Content.IntegrationTests.Tests // Check that the number of entities has gone back to the original value. Assert.That(Count(server.EntMan), Is.EqualTo(count), $"Server prototype {protoId} failed on deletion: count didn't reset properly\n" + BuildDiffString(serverEntities, Entities(server.EntMan), server.EntMan)); - Assert.That(client.EntMan.EntityCount, Is.EqualTo(clientCount), $"Client prototype {protoId} failed on deletion: count didn't reset properly:\n" + - $"Expected {clientCount} and found {client.EntMan.EntityCount}.\n" + + Assert.That(Count(client.EntMan), Is.EqualTo(clientCount), $"Client prototype {protoId} failed on deletion: count didn't reset properly:\n" + + $"Expected {clientCount} and found {Count(client.EntMan)}.\n" + $"Server count was {count}.\n" + BuildDiffString(clientEntities, Entities(client.EntMan), client.EntMan)); }