Dependency update / fixes / skrungle bungle (#23745)

* Give .props files 2-space indents.

* Move to Central Package Management.

Allows us to store NuGet package versions all in one place. Yay!

* Update NuGet packages and fix code for changes.

Notable:

Changes to ILVerify.
Npgsql doesn't need hacks for inet anymore, now we need hacks to make the old code work with this new reality.
NUnit's analyzers are already complaining and I didn't even update it to 4.x yet.
TerraFX changed to GetLastSystemError so error handling had to be changed.
Buncha APIs have more NRT annotations.

* Remove dotnet-eng NuGet package source.

I genuinely don't know what this was for, and Central Package Management starts throwing warnings about it, so YEET.

* Remove Robust.Physics project.

Never used.

* Remove erroneous NVorbis reference.

Should be VorbisPizza and otherwise wasn't used.

* Sandbox fixes

* Remove unused unit test package references.

Castle.Core and NUnit.ConsoleRunner.

* Update NUnit to 4.0.1

This requires replacing all the old assertion methods because they removed them 🥲

* Oh so that's what dotnet-eng was used for. Yeah ok that makes sense.

* Add Robust.Analyzers.Test

* Update submodule

* commit to re-run CI
This commit is contained in:
Pieter-Jan Briers
2024-01-12 23:22:01 +01:00
committed by GitHub
parent d2a1eae2d9
commit a6c9c36b68
44 changed files with 267 additions and 294 deletions

View File

@@ -8,10 +8,9 @@
<OutputPath>..\bin\Content.Tests\</OutputPath>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit.ConsoleRunner" Version="3.15.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
<PackageReference Include="NUnit" />
<PackageReference Include="NUnit3TestAdapter" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Content.Client\Content.Client.csproj" />

View File

@@ -58,7 +58,7 @@ namespace Content.Tests.Shared.Alert
entManager.EventBus.RaiseComponentEvent(alertsComponent, getty);
var alertState = (AlertsComponent.AlertsComponent_AutoState) getty.State!;
Assert.NotNull(alertState);
Assert.That(alertState, Is.Not.Null);
Assert.That(alertState.Alerts.Count, Is.EqualTo(1));
Assert.That(alertState.Alerts.ContainsKey(lowpressure.AlertKey));

View File

@@ -54,7 +54,7 @@ public sealed class DirectionRandomizerTest : RobustUnitTest
// Because of above foreach this asserts
// rand[1,2,3] - [1,2,3] == {}
// i.e. randomized set minus original set is empty
Assert.IsTrue(set.Count == 0, "Each element must appear once ");
Assert.That(set.Count == 0, "Each element must appear once ");
}
}

View File

@@ -35,7 +35,7 @@ namespace Content.Tests.Shared.Utility
var random = IoCManager.Resolve<IRobustRandom>();
var id = random.Pick(dataSet);
Assert.NotNull(id);
Assert.That(id, Is.Not.Null);
}
}
}