Fix content.integration tests warnings (#17817)

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
TemporalOroboros
2023-07-05 21:54:25 -07:00
committed by GitHub
parent 20c1754abd
commit ba91023a85
121 changed files with 3658 additions and 1961 deletions

View File

@@ -1,13 +1,9 @@
using System.Threading.Tasks;
using NUnit.Framework;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Network;
namespace Content.IntegrationTests.Tests.Networking
{
[TestFixture]
sealed class NetworkIdsMatchTest
public sealed class NetworkIdsMatchTest
{
[Test]
public async Task TestConnect()
@@ -22,17 +18,26 @@ namespace Content.IntegrationTests.Tests.Networking
var clientNetComps = clientCompFactory.NetworkedComponents;
var serverNetComps = serverCompFactory.NetworkedComponents;
Assert.That(clientNetComps, Is.Not.Null);
Assert.That(serverNetComps, Is.Not.Null);
Assert.That(clientNetComps.Count, Is.EqualTo(serverNetComps.Count));
// Checks that at least Metadata and Transform are registered.
Assert.That(clientNetComps.Count, Is.GreaterThanOrEqualTo(2));
for (var netId = 0; netId < clientNetComps.Count; netId++)
Assert.Multiple(() =>
{
Assert.That(clientNetComps[netId].Name, Is.EqualTo(serverNetComps[netId].Name));
}
Assert.That(clientNetComps, Is.Not.Null);
Assert.That(serverNetComps, Is.Not.Null);
});
Assert.Multiple(() =>
{
Assert.That(clientNetComps, Has.Count.EqualTo(serverNetComps.Count));
// Checks that at least Metadata and Transform are registered.
Assert.That(clientNetComps, Has.Count.GreaterThanOrEqualTo(2));
});
Assert.Multiple(() =>
{
for (var netId = 0; netId < clientNetComps.Count; netId++)
{
Assert.That(clientNetComps[netId].Name, Is.EqualTo(serverNetComps[netId].Name));
}
});
await pairTracker.CleanReturnAsync();
}
}