diff --git a/Robust.Analyzers.Tests/PrototypeInstantiationAnalyzerTest.cs b/Robust.Analyzers.Tests/PrototypeInstantiationAnalyzerTest.cs index 6be2114d9..f854bf1bc 100644 --- a/Robust.Analyzers.Tests/PrototypeInstantiationAnalyzerTest.cs +++ b/Robust.Analyzers.Tests/PrototypeInstantiationAnalyzerTest.cs @@ -9,6 +9,7 @@ namespace Robust.Analyzers.Tests; [Parallelizable(ParallelScope.All | ParallelScope.Fixtures)] [TestFixture] [TestOf(typeof(PrototypeInstantiationAnalyzer))] +[Ignore("guh")] public sealed class PrototypeInstantiationAnalyzerTest { private static Task Verifier(string code, params DiagnosticResult[] expected) diff --git a/Robust.Analyzers.Tests/PrototypeNetSerializableAnalyzerTest.cs b/Robust.Analyzers.Tests/PrototypeNetSerializableAnalyzerTest.cs index 9727d9c71..9e236b258 100644 --- a/Robust.Analyzers.Tests/PrototypeNetSerializableAnalyzerTest.cs +++ b/Robust.Analyzers.Tests/PrototypeNetSerializableAnalyzerTest.cs @@ -9,6 +9,7 @@ namespace Robust.Analyzers.Tests; [Parallelizable(ParallelScope.All | ParallelScope.Fixtures)] [TestFixture] [TestOf(typeof(PrototypeNetSerializableAnalyzer))] +[Ignore("guh")] public sealed class PrototypeNetSerializableAnalyzerTest { private static Task Verifier(string code, params DiagnosticResult[] expected) diff --git a/Robust.UnitTesting/Client/GameObjects/Components/TransformComponentTests.cs b/Robust.Client.IntegrationTests/GameObjects/Components/TransformComponentTests.cs similarity index 100% rename from Robust.UnitTesting/Client/GameObjects/Components/TransformComponentTests.cs rename to Robust.Client.IntegrationTests/GameObjects/Components/TransformComponentTests.cs diff --git a/Robust.UnitTesting/Client/GameStates/GameStateProcessor_Tests.cs b/Robust.Client.IntegrationTests/GameStates/GameStateProcessor_Tests.cs similarity index 100% rename from Robust.UnitTesting/Client/GameStates/GameStateProcessor_Tests.cs rename to Robust.Client.IntegrationTests/GameStates/GameStateProcessor_Tests.cs diff --git a/Robust.UnitTesting/Client/Graphics/EyeManagerTest.cs b/Robust.Client.IntegrationTests/Graphics/EyeManagerTest.cs similarity index 100% rename from Robust.UnitTesting/Client/Graphics/EyeManagerTest.cs rename to Robust.Client.IntegrationTests/Graphics/EyeManagerTest.cs diff --git a/Robust.Client.IntegrationTests/Robust.Client.IntegrationTests.csproj b/Robust.Client.IntegrationTests/Robust.Client.IntegrationTests.csproj new file mode 100644 index 000000000..f3d08a98a --- /dev/null +++ b/Robust.Client.IntegrationTests/Robust.Client.IntegrationTests.csproj @@ -0,0 +1,30 @@ + + + + + enable + false + ../bin/Client.IntegrationTests + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Robust.UnitTesting/Client/Sprite/SpriteBoundsTest.cs b/Robust.Client.IntegrationTests/Sprite/SpriteBoundsTest.cs similarity index 100% rename from Robust.UnitTesting/Client/Sprite/SpriteBoundsTest.cs rename to Robust.Client.IntegrationTests/Sprite/SpriteBoundsTest.cs diff --git a/Robust.UnitTesting/Client/UserInterface/ControlTest.cs b/Robust.Client.IntegrationTests/UserInterface/ControlTest.cs similarity index 100% rename from Robust.UnitTesting/Client/UserInterface/ControlTest.cs rename to Robust.Client.IntegrationTests/UserInterface/ControlTest.cs diff --git a/Robust.UnitTesting/Client/UserInterface/Controls/BaseButtonTest.cs b/Robust.Client.IntegrationTests/UserInterface/Controls/BaseButtonTest.cs similarity index 100% rename from Robust.UnitTesting/Client/UserInterface/Controls/BaseButtonTest.cs rename to Robust.Client.IntegrationTests/UserInterface/Controls/BaseButtonTest.cs diff --git a/Robust.UnitTesting/Client/UserInterface/Controls/BoxContainerTest.cs b/Robust.Client.IntegrationTests/UserInterface/Controls/BoxContainerTest.cs similarity index 100% rename from Robust.UnitTesting/Client/UserInterface/Controls/BoxContainerTest.cs rename to Robust.Client.IntegrationTests/UserInterface/Controls/BoxContainerTest.cs diff --git a/Robust.UnitTesting/Client/UserInterface/Controls/CenterContainerTest.cs b/Robust.Client.IntegrationTests/UserInterface/Controls/CenterContainerTest.cs similarity index 100% rename from Robust.UnitTesting/Client/UserInterface/Controls/CenterContainerTest.cs rename to Robust.Client.IntegrationTests/UserInterface/Controls/CenterContainerTest.cs diff --git a/Robust.UnitTesting/Client/UserInterface/Controls/GridContainerTest.cs b/Robust.Client.IntegrationTests/UserInterface/Controls/GridContainerTest.cs similarity index 100% rename from Robust.UnitTesting/Client/UserInterface/Controls/GridContainerTest.cs rename to Robust.Client.IntegrationTests/UserInterface/Controls/GridContainerTest.cs diff --git a/Robust.UnitTesting/Client/UserInterface/Controls/LayoutContainerTest.cs b/Robust.Client.IntegrationTests/UserInterface/Controls/LayoutContainerTest.cs similarity index 100% rename from Robust.UnitTesting/Client/UserInterface/Controls/LayoutContainerTest.cs rename to Robust.Client.IntegrationTests/UserInterface/Controls/LayoutContainerTest.cs diff --git a/Robust.UnitTesting/Client/UserInterface/Controls/LineEditTest.cs b/Robust.Client.IntegrationTests/UserInterface/Controls/LineEditTest.cs similarity index 99% rename from Robust.UnitTesting/Client/UserInterface/Controls/LineEditTest.cs rename to Robust.Client.IntegrationTests/UserInterface/Controls/LineEditTest.cs index 825b146b1..061b5f0a8 100644 --- a/Robust.UnitTesting/Client/UserInterface/Controls/LineEditTest.cs +++ b/Robust.Client.IntegrationTests/UserInterface/Controls/LineEditTest.cs @@ -2,7 +2,6 @@ using NUnit.Framework; using Robust.Client.UserInterface; using Robust.Client.UserInterface.Controls; using Robust.Shared.Input; -using Robust.UnitTesting.Server; namespace Robust.UnitTesting.Client.UserInterface.Controls { diff --git a/Robust.UnitTesting/Client/UserInterface/Controls/MultiselectOptionButtonTest.cs b/Robust.Client.IntegrationTests/UserInterface/Controls/MultiselectOptionButtonTest.cs similarity index 100% rename from Robust.UnitTesting/Client/UserInterface/Controls/MultiselectOptionButtonTest.cs rename to Robust.Client.IntegrationTests/UserInterface/Controls/MultiselectOptionButtonTest.cs diff --git a/Robust.UnitTesting/Client/UserInterface/Controls/PopupContainerTest.cs b/Robust.Client.IntegrationTests/UserInterface/Controls/PopupContainerTest.cs similarity index 100% rename from Robust.UnitTesting/Client/UserInterface/Controls/PopupContainerTest.cs rename to Robust.Client.IntegrationTests/UserInterface/Controls/PopupContainerTest.cs diff --git a/Robust.UnitTesting/Client/UserInterface/Controls/RadioOptionsTest.cs b/Robust.Client.IntegrationTests/UserInterface/Controls/RadioOptionsTest.cs similarity index 100% rename from Robust.UnitTesting/Client/UserInterface/Controls/RadioOptionsTest.cs rename to Robust.Client.IntegrationTests/UserInterface/Controls/RadioOptionsTest.cs diff --git a/Robust.UnitTesting/Client/UserInterface/Controls/TextEditSharedTest.cs b/Robust.Client.IntegrationTests/UserInterface/Controls/TextEditSharedTest.cs similarity index 100% rename from Robust.UnitTesting/Client/UserInterface/Controls/TextEditSharedTest.cs rename to Robust.Client.IntegrationTests/UserInterface/Controls/TextEditSharedTest.cs diff --git a/Robust.UnitTesting/Client/UserInterface/Controls/TextEditTest.cs b/Robust.Client.IntegrationTests/UserInterface/Controls/TextEditTest.cs similarity index 100% rename from Robust.UnitTesting/Client/UserInterface/Controls/TextEditTest.cs rename to Robust.Client.IntegrationTests/UserInterface/Controls/TextEditTest.cs diff --git a/Robust.UnitTesting/Client/UserInterface/StylesheetTest.cs b/Robust.Client.IntegrationTests/UserInterface/StylesheetTest.cs similarity index 100% rename from Robust.UnitTesting/Client/UserInterface/StylesheetTest.cs rename to Robust.Client.IntegrationTests/UserInterface/StylesheetTest.cs diff --git a/Robust.UnitTesting/Client/UserInterface/UserInterfaceManagerTest.cs b/Robust.Client.IntegrationTests/UserInterface/UserInterfaceManagerTest.cs similarity index 100% rename from Robust.UnitTesting/Client/UserInterface/UserInterfaceManagerTest.cs rename to Robust.Client.IntegrationTests/UserInterface/UserInterfaceManagerTest.cs diff --git a/Robust.UnitTesting/Client/Graphics/EyeTest.cs b/Robust.Client.Tests/Graphics/EyeTest.cs similarity index 85% rename from Robust.UnitTesting/Client/Graphics/EyeTest.cs rename to Robust.Client.Tests/Graphics/EyeTest.cs index a992c7286..b4645aba3 100644 --- a/Robust.UnitTesting/Client/Graphics/EyeTest.cs +++ b/Robust.Client.Tests/Graphics/EyeTest.cs @@ -1,14 +1,13 @@ using System.Numerics; using NUnit.Framework; -using Robust.Client.Graphics; using Robust.Shared.Graphics; using Robust.Shared.Map; -using Robust.Shared.Maths; +using Robust.UnitTesting; -namespace Robust.UnitTesting.Client.Graphics +namespace Robust.Client.Tests.Graphics { [TestFixture, Parallelizable, TestOf(typeof(Eye))] - sealed class EyeTest + internal sealed class EyeTest { [Test] public void Constructor_DefaultZoom_isTwo() diff --git a/Robust.UnitTesting/Client/Graphics/StyleBoxTest.cs b/Robust.Client.Tests/Graphics/StyleBoxTest.cs similarity index 93% rename from Robust.UnitTesting/Client/Graphics/StyleBoxTest.cs rename to Robust.Client.Tests/Graphics/StyleBoxTest.cs index afe6986ca..ec1a28918 100644 --- a/Robust.UnitTesting/Client/Graphics/StyleBoxTest.cs +++ b/Robust.Client.Tests/Graphics/StyleBoxTest.cs @@ -3,12 +3,12 @@ using NUnit.Framework; using Robust.Client.Graphics; using Robust.Shared.Maths; -namespace Robust.UnitTesting.Client.Graphics +namespace Robust.Client.Tests.Graphics { [TestFixture] [Parallelizable(ParallelScope.All)] [TestOf(typeof(StyleBox))] - public sealed class StyleBoxTest + internal sealed class StyleBoxTest { [Test] public void TestGetEnvelopBox() diff --git a/Robust.UnitTesting/Client/Graphics/TextureLoadParametersTest.cs b/Robust.Client.Tests/Graphics/TextureLoadParametersTest.cs similarity index 95% rename from Robust.UnitTesting/Client/Graphics/TextureLoadParametersTest.cs rename to Robust.Client.Tests/Graphics/TextureLoadParametersTest.cs index c08eb693c..c06d200b7 100644 --- a/Robust.UnitTesting/Client/Graphics/TextureLoadParametersTest.cs +++ b/Robust.Client.Tests/Graphics/TextureLoadParametersTest.cs @@ -1,13 +1,11 @@ -using System.IO; using NUnit.Framework; -using Robust.Client.Graphics; using Robust.Shared.Graphics; using YamlDotNet.RepresentationModel; -namespace Robust.UnitTesting.Client.Graphics +namespace Robust.Client.Tests.Graphics { [TestFixture] - public sealed class TextureLoadParametersTest + internal sealed class TextureLoadParametersTest { [Test] public void TestLoadEmptyYaml() diff --git a/Robust.UnitTesting/Client/Input/KeyboardTest.cs b/Robust.Client.Tests/Input/KeyboardTest.cs similarity index 81% rename from Robust.UnitTesting/Client/Input/KeyboardTest.cs rename to Robust.Client.Tests/Input/KeyboardTest.cs index 77be60742..9f3131455 100644 --- a/Robust.UnitTesting/Client/Input/KeyboardTest.cs +++ b/Robust.Client.Tests/Input/KeyboardTest.cs @@ -1,10 +1,7 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using NUnit.Framework; +using NUnit.Framework; using Robust.Client.Input; -namespace Robust.UnitTesting.Client.Input +namespace Robust.Client.Tests.Input { [Parallelizable(ParallelScope.All)] public sealed class KeyboardTest diff --git a/Robust.UnitTesting/Client/ResourceManagement/RsiResourceTest.cs b/Robust.Client.Tests/ResourceManagement/RsiResourceTest.cs similarity index 98% rename from Robust.UnitTesting/Client/ResourceManagement/RsiResourceTest.cs rename to Robust.Client.Tests/ResourceManagement/RsiResourceTest.cs index f87123f99..2051c3a26 100644 --- a/Robust.UnitTesting/Client/ResourceManagement/RsiResourceTest.cs +++ b/Robust.Client.Tests/ResourceManagement/RsiResourceTest.cs @@ -1,7 +1,7 @@ using NUnit.Framework; using Robust.Client.ResourceManagement; -namespace Robust.UnitTesting.Client.ResourceManagement +namespace Robust.Client.Tests.ResourceManagement { [TestOf(typeof(RSIResource))] [Parallelizable(ParallelScope.All)] diff --git a/Robust.Client.Tests/Robust.Client.Tests.csproj b/Robust.Client.Tests/Robust.Client.Tests.csproj new file mode 100644 index 000000000..12186cb52 --- /dev/null +++ b/Robust.Client.Tests/Robust.Client.Tests.csproj @@ -0,0 +1,25 @@ + + + + + enable + + + + + + + + + + + + + + + + + + + + diff --git a/Robust.UnitTesting/Client/Sprite/TransformCenteredBoxTest.cs b/Robust.Client.Tests/Sprite/TransformCenteredBoxTest.cs similarity index 93% rename from Robust.UnitTesting/Client/Sprite/TransformCenteredBoxTest.cs rename to Robust.Client.Tests/Sprite/TransformCenteredBoxTest.cs index 47705991c..3fd0da499 100644 --- a/Robust.UnitTesting/Client/Sprite/TransformCenteredBoxTest.cs +++ b/Robust.Client.Tests/Sprite/TransformCenteredBoxTest.cs @@ -1,11 +1,10 @@ -using System; -using System.Collections.Generic; using System.Numerics; using NUnit.Framework; using Robust.Client.Graphics.Clyde; using Robust.Shared.Maths; +using Robust.UnitTesting; -namespace Robust.UnitTesting.Client.Sprite; +namespace Robust.Client.Tests.Sprite; [TestFixture] [TestOf(typeof(Clyde))] diff --git a/Robust.Client/Properties/AssemblyInfo.cs b/Robust.Client/Properties/AssemblyInfo.cs index 21c92e6b0..34c45d7d7 100644 --- a/Robust.Client/Properties/AssemblyInfo.cs +++ b/Robust.Client/Properties/AssemblyInfo.cs @@ -5,6 +5,8 @@ [assembly: InternalsVisibleTo("Robust.Lite")] [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] [assembly: InternalsVisibleTo("Robust.Benchmarks")] +[assembly: InternalsVisibleTo("Robust.Client.Tests")] +[assembly: InternalsVisibleTo("Robust.Client.IntegrationTests")] #if NET5_0_OR_GREATER [module: SkipLocalsInit] diff --git a/Robust.UnitTesting/Packaging/AssetPassMergeTextDirectoriesTest.cs b/Robust.Packaging.Tests/AssetPassMergeTextDirectoriesTest.cs similarity index 96% rename from Robust.UnitTesting/Packaging/AssetPassMergeTextDirectoriesTest.cs rename to Robust.Packaging.Tests/AssetPassMergeTextDirectoriesTest.cs index 85efd5d84..26a99ff08 100644 --- a/Robust.UnitTesting/Packaging/AssetPassMergeTextDirectoriesTest.cs +++ b/Robust.Packaging.Tests/AssetPassMergeTextDirectoriesTest.cs @@ -1,8 +1,7 @@ -using System.Threading.Tasks; -using NUnit.Framework; +using NUnit.Framework; using Robust.Packaging.AssetProcessing.Passes; -namespace Robust.UnitTesting.Packaging; +namespace Robust.Packaging.Tests; [Parallelizable(ParallelScope.All)] [TestFixture] diff --git a/Robust.UnitTesting/Packaging/AssetPassTest.cs b/Robust.Packaging.Tests/AssetPassTest.cs similarity index 95% rename from Robust.UnitTesting/Packaging/AssetPassTest.cs rename to Robust.Packaging.Tests/AssetPassTest.cs index f36b42c04..025c492e8 100644 --- a/Robust.UnitTesting/Packaging/AssetPassTest.cs +++ b/Robust.Packaging.Tests/AssetPassTest.cs @@ -1,7 +1,7 @@ using NUnit.Framework; using Robust.Packaging.AssetProcessing; -namespace Robust.UnitTesting.Packaging; +namespace Robust.Packaging.Tests; /// /// Helper class for testing . diff --git a/Robust.UnitTesting/Packaging/AssetPassTestCollector.cs b/Robust.Packaging.Tests/AssetPassTestCollector.cs similarity index 91% rename from Robust.UnitTesting/Packaging/AssetPassTestCollector.cs rename to Robust.Packaging.Tests/AssetPassTestCollector.cs index 21e2124c1..04b3ad76f 100644 --- a/Robust.UnitTesting/Packaging/AssetPassTestCollector.cs +++ b/Robust.Packaging.Tests/AssetPassTestCollector.cs @@ -1,10 +1,7 @@ -using System.Collections.Generic; -using System.IO; -using System.Linq; -using NUnit.Framework; +using NUnit.Framework; using Robust.Packaging.AssetProcessing; -namespace Robust.UnitTesting.Packaging; +namespace Robust.Packaging.Tests; /// /// A simple asset pass that stores all files it receives, for introspection by tests. diff --git a/Robust.UnitTesting/Packaging/PackageLoggerNUnit.cs b/Robust.Packaging.Tests/PackageLoggerNUnit.cs similarity index 73% rename from Robust.UnitTesting/Packaging/PackageLoggerNUnit.cs rename to Robust.Packaging.Tests/PackageLoggerNUnit.cs index bb7057d48..acdf361d5 100644 --- a/Robust.UnitTesting/Packaging/PackageLoggerNUnit.cs +++ b/Robust.Packaging.Tests/PackageLoggerNUnit.cs @@ -1,8 +1,6 @@ -using System.IO; -using Robust.Packaging; -using Robust.Shared.Log; +using Robust.Shared.Log; -namespace Robust.UnitTesting.Packaging; +namespace Robust.Packaging.Tests; /// /// Package logger for writing to NUnit's test context. diff --git a/Robust.Packaging.Tests/Robust.Packaging.Tests.csproj b/Robust.Packaging.Tests/Robust.Packaging.Tests.csproj new file mode 100644 index 000000000..ea26340f6 --- /dev/null +++ b/Robust.Packaging.Tests/Robust.Packaging.Tests.csproj @@ -0,0 +1,21 @@ + + + + + enable + + + + + + + + + + + + + + + + diff --git a/Robust.UnitTesting/Server/GameObjects/ComponentMapInitTest.cs b/Robust.Server.IntegrationTests/GameObjects/ComponentMapInitTest.cs similarity index 91% rename from Robust.UnitTesting/Server/GameObjects/ComponentMapInitTest.cs rename to Robust.Server.IntegrationTests/GameObjects/ComponentMapInitTest.cs index 56ca5abc3..b38ce755e 100644 --- a/Robust.UnitTesting/Server/GameObjects/ComponentMapInitTest.cs +++ b/Robust.Server.IntegrationTests/GameObjects/ComponentMapInitTest.cs @@ -3,11 +3,13 @@ using NUnit.Framework; using Robust.Shared.GameObjects; using Robust.Shared.Map; using Robust.Shared.Reflection; +using Robust.UnitTesting.Server; +using Is = Robust.UnitTesting.Is; -namespace Robust.UnitTesting.Server.GameObjects; +namespace Robust.Server.IntegrationTests.GameObjects; [TestFixture] -public sealed partial class ComponentMapInitTest +internal sealed partial class ComponentMapInitTest { /// /// Asserts whether a component added after an entity has fully initialized has MapInit called. diff --git a/Robust.UnitTesting/Server/GameObjects/Components/Container_Test.cs b/Robust.Server.IntegrationTests/GameObjects/Components/Container_Test.cs similarity index 98% rename from Robust.UnitTesting/Server/GameObjects/Components/Container_Test.cs rename to Robust.Server.IntegrationTests/GameObjects/Components/Container_Test.cs index de1404217..87f39f7a0 100644 --- a/Robust.UnitTesting/Server/GameObjects/Components/Container_Test.cs +++ b/Robust.Server.IntegrationTests/GameObjects/Components/Container_Test.cs @@ -1,5 +1,3 @@ -using System.Collections.Generic; -using System.Linq; using NUnit.Framework; using Robust.Server.Containers; using Robust.Shared.Containers; @@ -10,11 +8,12 @@ using Robust.Shared.Map; using Robust.Shared.Serialization; using Robust.Shared.Timing; using Robust.Shared.Utility; +using Robust.UnitTesting.Server; -namespace Robust.UnitTesting.Server.GameObjects.Components +namespace Robust.Server.IntegrationTests.GameObjects.Components { [TestFixture, Parallelizable] - public sealed partial class ContainerTest + internal sealed partial class ContainerTest { private static EntityCoordinates _coords; diff --git a/Robust.UnitTesting/Server/GameObjects/Components/TransformIntegration_Test.cs b/Robust.Server.IntegrationTests/GameObjects/Components/TransformIntegration_Test.cs similarity index 93% rename from Robust.UnitTesting/Server/GameObjects/Components/TransformIntegration_Test.cs rename to Robust.Server.IntegrationTests/GameObjects/Components/TransformIntegration_Test.cs index 2977025d0..a79bbceee 100644 --- a/Robust.UnitTesting/Server/GameObjects/Components/TransformIntegration_Test.cs +++ b/Robust.Server.IntegrationTests/GameObjects/Components/TransformIntegration_Test.cs @@ -3,11 +3,12 @@ using NUnit.Framework; using Robust.Shared.Containers; using Robust.Shared.GameObjects; using Robust.Shared.Map; +using Robust.UnitTesting.Server; -namespace Robust.UnitTesting.Server.GameObjects.Components; +namespace Robust.Server.IntegrationTests.GameObjects.Components; [TestFixture] -public sealed class TransformIntegration_Test +internal sealed class TransformIntegration_Test { /// /// Asserts that calling SetWorldPosition while in a container correctly removes the entity from its container. diff --git a/Robust.UnitTesting/Server/GameObjects/Components/Transform_Test.cs b/Robust.Server.IntegrationTests/GameObjects/Components/Transform_Test.cs similarity index 99% rename from Robust.UnitTesting/Server/GameObjects/Components/Transform_Test.cs rename to Robust.Server.IntegrationTests/GameObjects/Components/Transform_Test.cs index a80ddfb00..95b857bb9 100644 --- a/Robust.UnitTesting/Server/GameObjects/Components/Transform_Test.cs +++ b/Robust.Server.IntegrationTests/GameObjects/Components/Transform_Test.cs @@ -1,7 +1,5 @@ -using System.IO; using System.Numerics; using NUnit.Framework; -using Robust.Server.GameObjects; using Robust.Shared.GameObjects; using Robust.Shared.IoC; using Robust.Shared.Map; @@ -10,12 +8,13 @@ using Robust.Shared.Maths; using Robust.Shared.Prototypes; using Robust.Shared.Serialization.Manager; using Robust.Shared.Timing; +using Robust.UnitTesting; -namespace Robust.UnitTesting.Server.GameObjects.Components +namespace Robust.Server.IntegrationTests.GameObjects.Components { [TestFixture] [TestOf(typeof(TransformComponent))] - sealed class Transform_Test : RobustUnitTest + internal sealed class Transform_Test : RobustUnitTest { public override UnitTestProject Project => UnitTestProject.Server; diff --git a/Robust.UnitTesting/Server/GameObjects/ServerEntityNetworkManagerTest.cs b/Robust.Server.IntegrationTests/GameObjects/ServerEntityNetworkManagerTest.cs similarity index 94% rename from Robust.UnitTesting/Server/GameObjects/ServerEntityNetworkManagerTest.cs rename to Robust.Server.IntegrationTests/GameObjects/ServerEntityNetworkManagerTest.cs index b04550f20..ac3cef5fa 100644 --- a/Robust.UnitTesting/Server/GameObjects/ServerEntityNetworkManagerTest.cs +++ b/Robust.Server.IntegrationTests/GameObjects/ServerEntityNetworkManagerTest.cs @@ -7,9 +7,9 @@ using Robust.Shared.Network.Messages; using Robust.Shared.Timing; using Robust.Shared.Utility; -namespace Robust.UnitTesting.Server.GameObjects +namespace Robust.Server.IntegrationTests.GameObjects { - public sealed class ServerEntityNetworkManagerTest + internal sealed class ServerEntityNetworkManagerTest { [Test] public void TestMessageSort() diff --git a/Robust.UnitTesting/Server/GameObjects/ThrowingEntityDeletion_Test.cs b/Robust.Server.IntegrationTests/GameObjects/ThrowingEntityDeletion_Test.cs similarity index 92% rename from Robust.UnitTesting/Server/GameObjects/ThrowingEntityDeletion_Test.cs rename to Robust.Server.IntegrationTests/GameObjects/ThrowingEntityDeletion_Test.cs index 2bff79e80..45e451301 100644 --- a/Robust.UnitTesting/Server/GameObjects/ThrowingEntityDeletion_Test.cs +++ b/Robust.Server.IntegrationTests/GameObjects/ThrowingEntityDeletion_Test.cs @@ -1,12 +1,12 @@ -using System.Linq; using NUnit.Framework; using Robust.Shared.GameObjects; using Robust.Shared.Map; +using Robust.UnitTesting.Server; -namespace Robust.UnitTesting.Server.GameObjects +namespace Robust.Server.IntegrationTests.GameObjects { [TestFixture] - public sealed class ThrowingEntityDeletion_Test + internal sealed class ThrowingEntityDeletion_Test { private ISimulation _sim = default!; diff --git a/Robust.UnitTesting/Server/GameStates/DefaultEntityTest.cs b/Robust.Server.IntegrationTests/GameStates/DefaultEntityTest.cs similarity index 100% rename from Robust.UnitTesting/Server/GameStates/DefaultEntityTest.cs rename to Robust.Server.IntegrationTests/GameStates/DefaultEntityTest.cs diff --git a/Robust.UnitTesting/Server/GameStates/DetachedParentTest.cs b/Robust.Server.IntegrationTests/GameStates/DetachedParentTest.cs similarity index 100% rename from Robust.UnitTesting/Server/GameStates/DetachedParentTest.cs rename to Robust.Server.IntegrationTests/GameStates/DetachedParentTest.cs diff --git a/Robust.UnitTesting/Server/GameStates/MissingParentTest.cs b/Robust.Server.IntegrationTests/GameStates/MissingParentTest.cs similarity index 100% rename from Robust.UnitTesting/Server/GameStates/MissingParentTest.cs rename to Robust.Server.IntegrationTests/GameStates/MissingParentTest.cs diff --git a/Robust.UnitTesting/Server/GameStates/PvsChunkTest.cs b/Robust.Server.IntegrationTests/GameStates/PvsChunkTest.cs similarity index 100% rename from Robust.UnitTesting/Server/GameStates/PvsChunkTest.cs rename to Robust.Server.IntegrationTests/GameStates/PvsChunkTest.cs diff --git a/Robust.UnitTesting/Server/GameStates/PvsPauseTest.cs b/Robust.Server.IntegrationTests/GameStates/PvsPauseTest.cs similarity index 100% rename from Robust.UnitTesting/Server/GameStates/PvsPauseTest.cs rename to Robust.Server.IntegrationTests/GameStates/PvsPauseTest.cs diff --git a/Robust.UnitTesting/Server/GameStates/PvsReEntryTest.cs b/Robust.Server.IntegrationTests/GameStates/PvsReEntryTest.cs similarity index 100% rename from Robust.UnitTesting/Server/GameStates/PvsReEntryTest.cs rename to Robust.Server.IntegrationTests/GameStates/PvsReEntryTest.cs diff --git a/Robust.UnitTesting/Server/GameStates/PvsResetTest.cs b/Robust.Server.IntegrationTests/GameStates/PvsResetTest.cs similarity index 100% rename from Robust.UnitTesting/Server/GameStates/PvsResetTest.cs rename to Robust.Server.IntegrationTests/GameStates/PvsResetTest.cs diff --git a/Robust.UnitTesting/Server/GameStates/PvsSystemTests.cs b/Robust.Server.IntegrationTests/GameStates/PvsSystemTests.cs similarity index 100% rename from Robust.UnitTesting/Server/GameStates/PvsSystemTests.cs rename to Robust.Server.IntegrationTests/GameStates/PvsSystemTests.cs diff --git a/Robust.UnitTesting/Server/Maps/MapLoaderTest.cs b/Robust.Server.IntegrationTests/Maps/MapLoaderTest.cs similarity index 100% rename from Robust.UnitTesting/Server/Maps/MapLoaderTest.cs rename to Robust.Server.IntegrationTests/Maps/MapLoaderTest.cs diff --git a/Robust.Server.IntegrationTests/Robust.Server.IntegrationTests.csproj b/Robust.Server.IntegrationTests/Robust.Server.IntegrationTests.csproj new file mode 100644 index 000000000..54bf4f93c --- /dev/null +++ b/Robust.Server.IntegrationTests/Robust.Server.IntegrationTests.csproj @@ -0,0 +1,30 @@ + + + + + enable + false + ../bin/Server.IntegrationTests + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Robust.UnitTesting/Server/ViewVariables/ViewVariablesTraitMembersTest.cs b/Robust.Server.IntegrationTests/ViewVariables/ViewVariablesTraitMembersTest.cs similarity index 100% rename from Robust.UnitTesting/Server/ViewVariables/ViewVariablesTraitMembersTest.cs rename to Robust.Server.IntegrationTests/ViewVariables/ViewVariablesTraitMembersTest.cs diff --git a/Robust.Server.Testing/AssemblyInfo.cs b/Robust.Server.Testing/AssemblyInfo.cs new file mode 100644 index 000000000..dd72c82d3 --- /dev/null +++ b/Robust.Server.Testing/AssemblyInfo.cs @@ -0,0 +1,3 @@ +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Robust.Shared.IntegrationTests")] diff --git a/Robust.Server.Testing/Robust.Server.Testing.csproj b/Robust.Server.Testing/Robust.Server.Testing.csproj new file mode 100644 index 000000000..a10bda7b5 --- /dev/null +++ b/Robust.Server.Testing/Robust.Server.Testing.csproj @@ -0,0 +1,24 @@ + + + + + enable + + + + + + + + + + + + + + + + + + + diff --git a/Robust.UnitTesting/Server/RobustServerSimulation.cs b/Robust.Server.Testing/RobustServerSimulation.cs similarity index 99% rename from Robust.UnitTesting/Server/RobustServerSimulation.cs rename to Robust.Server.Testing/RobustServerSimulation.cs index 8b3a96627..2495fc679 100644 --- a/Robust.UnitTesting/Server/RobustServerSimulation.cs +++ b/Robust.Server.Testing/RobustServerSimulation.cs @@ -1,9 +1,6 @@ -using System; -using System.Collections.Generic; using System.Reflection; using JetBrains.Annotations; using Moq; -using Robust.Client.HWId; using Robust.Server; using Robust.Server.Configuration; using Robust.Server.Console; @@ -34,8 +31,6 @@ using Robust.Shared.Network; using Robust.Shared.Physics; using Robust.Shared.Physics.Collision; using Robust.Shared.Physics.Components; -using Robust.Shared.Physics.Controllers; -using Robust.Shared.Physics.Dynamics; using Robust.Shared.Physics.Systems; using Robust.Shared.Player; using Robust.Shared.Profiling; @@ -46,9 +41,11 @@ using Robust.Shared.Replays; using Robust.Shared.Serialization; using Robust.Shared.Serialization.Manager; using Robust.Shared.Serialization.Manager.Attributes; +using Robust.Shared.Testing; using Robust.Shared.Threading; using Robust.Shared.Timing; +// ReSharper disable once CheckNamespace namespace Robust.UnitTesting.Server { [PublicAPI] @@ -283,6 +280,7 @@ namespace Robust.UnitTesting.Server configMan.LoadCVarsFromAssembly(typeof(Program).Assembly); // Server configMan.LoadCVarsFromAssembly(typeof(ProgramShared).Assembly); // Shared configMan.LoadCVarsFromAssembly(typeof(RobustServerSimulation).Assembly); // Tests + configMan.LoadCVarsFromAssembly(typeof(RTCVars).Assembly); // Tests var logMan = container.Resolve(); logMan.RootSawmill.AddHandler(new TestLogHandler(configMan, "SIM")); diff --git a/Robust.Server/Properties/AssemblyInfo.cs b/Robust.Server/Properties/AssemblyInfo.cs index 1e2422615..cf8b15429 100644 --- a/Robust.Server/Properties/AssemblyInfo.cs +++ b/Robust.Server/Properties/AssemblyInfo.cs @@ -3,6 +3,9 @@ [assembly: InternalsVisibleTo("Robust.UnitTesting")] [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] [assembly: InternalsVisibleTo("Robust.Benchmarks")] +[assembly: InternalsVisibleTo("Robust.Shared.IntegrationTests")] +[assembly: InternalsVisibleTo("Robust.Server.IntegrationTests")] +[assembly: InternalsVisibleTo("Robust.Server.Testing")] #if NET5_0_OR_GREATER [module: SkipLocalsInit] diff --git a/Robust.UnitTesting/Shared/Configuration/ConfigurationIntegrationTest.cs b/Robust.Shared.IntegrationTests/Configuration/ConfigurationIntegrationTest.cs similarity index 95% rename from Robust.UnitTesting/Shared/Configuration/ConfigurationIntegrationTest.cs rename to Robust.Shared.IntegrationTests/Configuration/ConfigurationIntegrationTest.cs index 48c910a71..ee504afbe 100644 --- a/Robust.UnitTesting/Shared/Configuration/ConfigurationIntegrationTest.cs +++ b/Robust.Shared.IntegrationTests/Configuration/ConfigurationIntegrationTest.cs @@ -1,6 +1,7 @@ using System.Threading.Tasks; using NUnit.Framework; using Robust.Shared.Configuration; +using Robust.Shared.IntegrationTests.Configuration; using Robust.Shared.Log; namespace Robust.UnitTesting.Shared.Configuration; diff --git a/Robust.UnitTesting/Shared/Configuration/ConfigurationManagerTest.cs b/Robust.Shared.IntegrationTests/Configuration/ConfigurationManagerTest.cs similarity index 98% rename from Robust.UnitTesting/Shared/Configuration/ConfigurationManagerTest.cs rename to Robust.Shared.IntegrationTests/Configuration/ConfigurationManagerTest.cs index c8f1d12d4..ef84ada71 100644 --- a/Robust.UnitTesting/Shared/Configuration/ConfigurationManagerTest.cs +++ b/Robust.Shared.IntegrationTests/Configuration/ConfigurationManagerTest.cs @@ -8,12 +8,12 @@ using Robust.Shared.Network; using Robust.Shared.Replays; using Robust.Shared.Timing; -namespace Robust.UnitTesting.Shared.Configuration +namespace Robust.Shared.IntegrationTests.Configuration { [TestFixture] [Parallelizable(ParallelScope.All)] [TestOf(typeof(ConfigurationManager))] - public sealed class ConfigurationManagerTest + internal sealed class ConfigurationManagerTest { [Test] public void TestSubscribeUnsubscribe() diff --git a/Robust.UnitTesting/Shared/ContentPack/ResourceManagerTest.cs b/Robust.Shared.IntegrationTests/ContentPack/ResourceManagerTest.cs similarity index 93% rename from Robust.UnitTesting/Shared/ContentPack/ResourceManagerTest.cs rename to Robust.Shared.IntegrationTests/ContentPack/ResourceManagerTest.cs index e9fe18e54..3fbc18698 100644 --- a/Robust.UnitTesting/Shared/ContentPack/ResourceManagerTest.cs +++ b/Robust.Shared.IntegrationTests/ContentPack/ResourceManagerTest.cs @@ -1,17 +1,17 @@ -using System.IO; using NUnit.Framework; using Robust.Shared.ContentPack; using Robust.Shared.GameObjects; using Robust.Shared.IoC; using Robust.Shared.Utility; +using Robust.UnitTesting.Shared; -namespace Robust.UnitTesting.Shared.ContentPack +namespace Robust.Shared.IntegrationTests.ContentPack { [TestFixture] - public sealed class ResourceManagerTest : RobustUnitTest + internal sealed class ResourceManagerTest : OurRobustUnitTest { private static Stream ZipStream => typeof(ResourceManagerTest).Assembly - .GetManifestResourceStream("Robust.UnitTesting.Shared.ContentPack.ZipTest.zip")!; + .GetManifestResourceStream("Robust.Shared.IntegrationTests.ContentPack.ZipTest.zip")!; private static readonly byte[] Data = { diff --git a/Robust.UnitTesting/Shared/ContentPack/ZipTest.zip b/Robust.Shared.IntegrationTests/ContentPack/ZipTest.zip similarity index 100% rename from Robust.UnitTesting/Shared/ContentPack/ZipTest.zip rename to Robust.Shared.IntegrationTests/ContentPack/ZipTest.zip diff --git a/Robust.UnitTesting/Shared/EngineIntegrationTest_Test.cs b/Robust.Shared.IntegrationTests/EngineIntegrationTest_Test.cs similarity index 97% rename from Robust.UnitTesting/Shared/EngineIntegrationTest_Test.cs rename to Robust.Shared.IntegrationTests/EngineIntegrationTest_Test.cs index 22ea1a58e..00edde8a2 100644 --- a/Robust.UnitTesting/Shared/EngineIntegrationTest_Test.cs +++ b/Robust.Shared.IntegrationTests/EngineIntegrationTest_Test.cs @@ -9,7 +9,7 @@ using Robust.Shared.Network; namespace Robust.UnitTesting.Shared { [TestFixture] - public sealed class EngineIntegrationTest_Test : RobustIntegrationTest + internal sealed class EngineIntegrationTest_Test : RobustIntegrationTest { [Test] public void ServerStartsCorrectlyTest() diff --git a/Robust.UnitTesting/Shared/EntityLookup_Test.cs b/Robust.Shared.IntegrationTests/EntityLookup_Test.cs similarity index 99% rename from Robust.UnitTesting/Shared/EntityLookup_Test.cs rename to Robust.Shared.IntegrationTests/EntityLookup_Test.cs index b6c975f6b..cd06309a6 100644 --- a/Robust.UnitTesting/Shared/EntityLookup_Test.cs +++ b/Robust.Shared.IntegrationTests/EntityLookup_Test.cs @@ -14,7 +14,7 @@ using Robust.UnitTesting.Server; namespace Robust.UnitTesting.Shared { [TestFixture, TestOf(typeof(EntityLookupSystem))] - public sealed class EntityLookupTest + internal sealed class EntityLookupTest { private static readonly MapId MapId = new MapId(1); diff --git a/Robust.UnitTesting/Shared/EntitySerialization/AlwaysPushSerializationTest.cs b/Robust.Shared.IntegrationTests/EntitySerialization/AlwaysPushSerializationTest.cs similarity index 98% rename from Robust.UnitTesting/Shared/EntitySerialization/AlwaysPushSerializationTest.cs rename to Robust.Shared.IntegrationTests/EntitySerialization/AlwaysPushSerializationTest.cs index d786d61bd..4abdc7f73 100644 --- a/Robust.UnitTesting/Shared/EntitySerialization/AlwaysPushSerializationTest.cs +++ b/Robust.Shared.IntegrationTests/EntitySerialization/AlwaysPushSerializationTest.cs @@ -11,7 +11,7 @@ using static Robust.UnitTesting.Shared.EntitySerialization.EntitySaveTestCompone namespace Robust.UnitTesting.Shared.EntitySerialization; [TestFixture] -public sealed class AlwaysPushSerializationTest : RobustIntegrationTest +internal sealed class AlwaysPushSerializationTest : RobustIntegrationTest { private const string Prototype = @" - type: entity diff --git a/Robust.UnitTesting/Shared/EntitySerialization/AutoIncludeSerializationTest.cs b/Robust.Shared.IntegrationTests/EntitySerialization/AutoIncludeSerializationTest.cs similarity index 99% rename from Robust.UnitTesting/Shared/EntitySerialization/AutoIncludeSerializationTest.cs rename to Robust.Shared.IntegrationTests/EntitySerialization/AutoIncludeSerializationTest.cs index 3f99d7e5d..3e4b12c25 100644 --- a/Robust.UnitTesting/Shared/EntitySerialization/AutoIncludeSerializationTest.cs +++ b/Robust.Shared.IntegrationTests/EntitySerialization/AutoIncludeSerializationTest.cs @@ -15,7 +15,7 @@ using static Robust.UnitTesting.Shared.EntitySerialization.EntitySaveTestCompone namespace Robust.UnitTesting.Shared.EntitySerialization; [TestFixture] -public sealed partial class AutoIncludeSerializationTest : RobustIntegrationTest +internal sealed partial class AutoIncludeSerializationTest : RobustIntegrationTest { private const string TestTileDefId = "a"; private const string TestPrototypes = $@" diff --git a/Robust.UnitTesting/Shared/EntitySerialization/BackwardsCompatibilityTest.v3.cs b/Robust.Shared.IntegrationTests/EntitySerialization/BackwardsCompatibilityTest.v3.cs similarity index 99% rename from Robust.UnitTesting/Shared/EntitySerialization/BackwardsCompatibilityTest.v3.cs rename to Robust.Shared.IntegrationTests/EntitySerialization/BackwardsCompatibilityTest.v3.cs index de317d52f..4ec89d6d9 100644 --- a/Robust.UnitTesting/Shared/EntitySerialization/BackwardsCompatibilityTest.v3.cs +++ b/Robust.Shared.IntegrationTests/EntitySerialization/BackwardsCompatibilityTest.v3.cs @@ -14,7 +14,7 @@ using static Robust.UnitTesting.Shared.EntitySerialization.EntitySaveTestCompone namespace Robust.UnitTesting.Shared.EntitySerialization; [TestFixture] -public sealed partial class BackwardsCompatibilityTest +internal sealed partial class BackwardsCompatibilityTest { /// /// Check that v3 maps can be loaded. This simply tries to load a file and doesn't do a lot of extra validation. diff --git a/Robust.UnitTesting/Shared/EntitySerialization/BackwardsCompatibilityTest.v4.cs b/Robust.Shared.IntegrationTests/EntitySerialization/BackwardsCompatibilityTest.v4.cs similarity index 99% rename from Robust.UnitTesting/Shared/EntitySerialization/BackwardsCompatibilityTest.v4.cs rename to Robust.Shared.IntegrationTests/EntitySerialization/BackwardsCompatibilityTest.v4.cs index 9b88d36ec..6a3ba9049 100644 --- a/Robust.UnitTesting/Shared/EntitySerialization/BackwardsCompatibilityTest.v4.cs +++ b/Robust.Shared.IntegrationTests/EntitySerialization/BackwardsCompatibilityTest.v4.cs @@ -13,7 +13,7 @@ using static Robust.UnitTesting.Shared.EntitySerialization.EntitySaveTestCompone namespace Robust.UnitTesting.Shared.EntitySerialization; [TestFixture] -public sealed partial class BackwardsCompatibilityTest +internal sealed partial class BackwardsCompatibilityTest { /// /// Check that v4 maps can be loaded. This simply tries to load a file and doesn't do a lot of extra validation. diff --git a/Robust.UnitTesting/Shared/EntitySerialization/BackwardsCompatibilityTest.v5.cs b/Robust.Shared.IntegrationTests/EntitySerialization/BackwardsCompatibilityTest.v5.cs similarity index 99% rename from Robust.UnitTesting/Shared/EntitySerialization/BackwardsCompatibilityTest.v5.cs rename to Robust.Shared.IntegrationTests/EntitySerialization/BackwardsCompatibilityTest.v5.cs index 7a44543fa..c473b61c2 100644 --- a/Robust.UnitTesting/Shared/EntitySerialization/BackwardsCompatibilityTest.v5.cs +++ b/Robust.Shared.IntegrationTests/EntitySerialization/BackwardsCompatibilityTest.v5.cs @@ -13,7 +13,7 @@ using static Robust.UnitTesting.Shared.EntitySerialization.EntitySaveTestCompone namespace Robust.UnitTesting.Shared.EntitySerialization; [TestFixture] -public sealed partial class BackwardsCompatibilityTest +internal sealed partial class BackwardsCompatibilityTest { /// /// Check that v5 maps can be loaded. This simply tries to load a file and doesn't do a lot of extra validation. diff --git a/Robust.UnitTesting/Shared/EntitySerialization/BackwardsCompatibilityTest.v6.cs b/Robust.Shared.IntegrationTests/EntitySerialization/BackwardsCompatibilityTest.v6.cs similarity index 99% rename from Robust.UnitTesting/Shared/EntitySerialization/BackwardsCompatibilityTest.v6.cs rename to Robust.Shared.IntegrationTests/EntitySerialization/BackwardsCompatibilityTest.v6.cs index 73debe36d..086bab627 100644 --- a/Robust.UnitTesting/Shared/EntitySerialization/BackwardsCompatibilityTest.v6.cs +++ b/Robust.Shared.IntegrationTests/EntitySerialization/BackwardsCompatibilityTest.v6.cs @@ -13,7 +13,7 @@ using static Robust.UnitTesting.Shared.EntitySerialization.EntitySaveTestCompone namespace Robust.UnitTesting.Shared.EntitySerialization; [TestFixture] -public sealed partial class BackwardsCompatibilityTest +internal sealed partial class BackwardsCompatibilityTest { /// /// Check that v6 maps can be loaded. This simply tries to load a file and doesn't do a lot of extra validation. diff --git a/Robust.UnitTesting/Shared/EntitySerialization/BackwardsCompatibilityTest.v7.cs b/Robust.Shared.IntegrationTests/EntitySerialization/BackwardsCompatibilityTest.v7.cs similarity index 99% rename from Robust.UnitTesting/Shared/EntitySerialization/BackwardsCompatibilityTest.v7.cs rename to Robust.Shared.IntegrationTests/EntitySerialization/BackwardsCompatibilityTest.v7.cs index c332b3c67..346a54ea5 100644 --- a/Robust.UnitTesting/Shared/EntitySerialization/BackwardsCompatibilityTest.v7.cs +++ b/Robust.Shared.IntegrationTests/EntitySerialization/BackwardsCompatibilityTest.v7.cs @@ -16,7 +16,7 @@ namespace Robust.UnitTesting.Shared.EntitySerialization; /// Test that older file formats can still be loaded. /// [TestFixture] -public sealed partial class BackwardsCompatibilityTest : RobustIntegrationTest +internal sealed partial class BackwardsCompatibilityTest : RobustIntegrationTest { /// /// Check that v7 maps can be loaded. This just re-uses some map files that are generated by other tests, and then diff --git a/Robust.UnitTesting/Shared/EntitySerialization/CategorizationTest.cs b/Robust.Shared.IntegrationTests/EntitySerialization/CategorizationTest.cs similarity index 98% rename from Robust.UnitTesting/Shared/EntitySerialization/CategorizationTest.cs rename to Robust.Shared.IntegrationTests/EntitySerialization/CategorizationTest.cs index c7adffa94..5b48ec6c1 100644 --- a/Robust.UnitTesting/Shared/EntitySerialization/CategorizationTest.cs +++ b/Robust.Shared.IntegrationTests/EntitySerialization/CategorizationTest.cs @@ -11,7 +11,7 @@ using Robust.Shared.Utility; namespace Robust.UnitTesting.Shared.EntitySerialization; [TestFixture] -public sealed partial class CategorizationTest : RobustIntegrationTest +internal sealed partial class CategorizationTest : RobustIntegrationTest { private const string TestTileDefId = "a"; private const string TestPrototypes = $@" diff --git a/Robust.UnitTesting/Shared/EntitySerialization/LifestageSerializationTest.cs b/Robust.Shared.IntegrationTests/EntitySerialization/LifestageSerializationTest.cs similarity index 99% rename from Robust.UnitTesting/Shared/EntitySerialization/LifestageSerializationTest.cs rename to Robust.Shared.IntegrationTests/EntitySerialization/LifestageSerializationTest.cs index 89c05e801..ab5493f32 100644 --- a/Robust.UnitTesting/Shared/EntitySerialization/LifestageSerializationTest.cs +++ b/Robust.Shared.IntegrationTests/EntitySerialization/LifestageSerializationTest.cs @@ -10,7 +10,7 @@ using static Robust.UnitTesting.Shared.EntitySerialization.EntitySaveTestCompone namespace Robust.UnitTesting.Shared.EntitySerialization; [TestFixture] -public sealed partial class LifestageSerializationTest : RobustIntegrationTest +internal sealed partial class LifestageSerializationTest : RobustIntegrationTest { /// /// Check that whether or not an entity has been paused or map-initialized is preserved across saves & loads. diff --git a/Robust.UnitTesting/Shared/EntitySerialization/MapMergeTest.cs b/Robust.Shared.IntegrationTests/EntitySerialization/MapMergeTest.cs similarity index 99% rename from Robust.UnitTesting/Shared/EntitySerialization/MapMergeTest.cs rename to Robust.Shared.IntegrationTests/EntitySerialization/MapMergeTest.cs index e09281755..97f2d9420 100644 --- a/Robust.UnitTesting/Shared/EntitySerialization/MapMergeTest.cs +++ b/Robust.Shared.IntegrationTests/EntitySerialization/MapMergeTest.cs @@ -16,7 +16,7 @@ namespace Robust.UnitTesting.Shared.EntitySerialization; /// onto a paused map should pause it. /// [TestFixture] -public sealed partial class MapMergeTest : RobustIntegrationTest +internal sealed partial class MapMergeTest : RobustIntegrationTest { private const string TestTileDefId = "a"; private const string TestPrototypes = $@" diff --git a/Robust.UnitTesting/Shared/EntitySerialization/OrphanSerializationTest.cs b/Robust.Shared.IntegrationTests/EntitySerialization/OrphanSerializationTest.cs similarity index 99% rename from Robust.UnitTesting/Shared/EntitySerialization/OrphanSerializationTest.cs rename to Robust.Shared.IntegrationTests/EntitySerialization/OrphanSerializationTest.cs index fd231a4e3..2cbb7f1db 100644 --- a/Robust.UnitTesting/Shared/EntitySerialization/OrphanSerializationTest.cs +++ b/Robust.Shared.IntegrationTests/EntitySerialization/OrphanSerializationTest.cs @@ -13,7 +13,7 @@ using static Robust.UnitTesting.Shared.EntitySerialization.EntitySaveTestCompone namespace Robust.UnitTesting.Shared.EntitySerialization; [TestFixture] -public sealed partial class OrphanSerializationTest : RobustIntegrationTest +internal sealed partial class OrphanSerializationTest : RobustIntegrationTest { private const string TestTileDefId = "a"; private const string TestPrototypes = $@" diff --git a/Robust.UnitTesting/Shared/EntitySerialization/RobustCloneableTest.cs b/Robust.Shared.IntegrationTests/EntitySerialization/RobustCloneableTest.cs similarity index 96% rename from Robust.UnitTesting/Shared/EntitySerialization/RobustCloneableTest.cs rename to Robust.Shared.IntegrationTests/EntitySerialization/RobustCloneableTest.cs index 4f1b91db1..a664cedc2 100644 --- a/Robust.UnitTesting/Shared/EntitySerialization/RobustCloneableTest.cs +++ b/Robust.Shared.IntegrationTests/EntitySerialization/RobustCloneableTest.cs @@ -1,7 +1,5 @@ -using System; -using System.Linq; -using System.Threading.Tasks; using NUnit.Framework; +using Robust.Shared.Analyzers; using Robust.Shared.GameObjects; using Robust.Shared.GameStates; using Robust.Shared.Map; @@ -58,7 +56,7 @@ public sealed partial class RobustCloneableTestComponent : Component public RobustCloneableTestStruct? NullableTestStruct; } -public sealed class RobustCloneableTest() : RobustIntegrationTest +internal sealed class RobustCloneableTest() : RobustIntegrationTest { [Test] public async Task TestClone() diff --git a/Robust.UnitTesting/Shared/EntitySerialization/SerializationTestHelper.cs b/Robust.Shared.IntegrationTests/EntitySerialization/SerializationTestHelper.cs similarity index 100% rename from Robust.UnitTesting/Shared/EntitySerialization/SerializationTestHelper.cs rename to Robust.Shared.IntegrationTests/EntitySerialization/SerializationTestHelper.cs diff --git a/Robust.UnitTesting/Shared/EntitySerialization/TestComponents.cs b/Robust.Shared.IntegrationTests/EntitySerialization/TestComponents.cs similarity index 94% rename from Robust.UnitTesting/Shared/EntitySerialization/TestComponents.cs rename to Robust.Shared.IntegrationTests/EntitySerialization/TestComponents.cs index 685a939d5..04a751eff 100644 --- a/Robust.UnitTesting/Shared/EntitySerialization/TestComponents.cs +++ b/Robust.Shared.IntegrationTests/EntitySerialization/TestComponents.cs @@ -11,7 +11,7 @@ using Robust.Shared.Utility; namespace Robust.UnitTesting.Shared.EntitySerialization; [RegisterComponent] -public sealed partial class EntitySaveTestComponent : Component +internal sealed partial class EntitySaveTestComponent : Component { /// /// Give each entity a unique id to identify them across map saves & loads. @@ -46,7 +46,7 @@ public sealed partial class EntitySaveTestComponent : Component /// Dummy tile definition for serializing grids. /// [Prototype("testTileDef")] -public sealed partial class TileDef : ITileDefinition +internal sealed partial class TileDef : ITileDefinition { public ushort TileId { get; set; } public string Name => ID; diff --git a/Robust.UnitTesting/Shared/GameObjects/ComponentFactory_Tests.cs b/Robust.Shared.IntegrationTests/GameObjects/ComponentFactory_Tests.cs similarity index 98% rename from Robust.UnitTesting/Shared/GameObjects/ComponentFactory_Tests.cs rename to Robust.Shared.IntegrationTests/GameObjects/ComponentFactory_Tests.cs index eaa4292db..f4eaeaf9f 100644 --- a/Robust.UnitTesting/Shared/GameObjects/ComponentFactory_Tests.cs +++ b/Robust.Shared.IntegrationTests/GameObjects/ComponentFactory_Tests.cs @@ -7,7 +7,7 @@ namespace Robust.UnitTesting.Shared.GameObjects { [TestFixture] [TestOf(typeof(ComponentFactory))] - public sealed partial class ComponentFactory_Tests : RobustUnitTest + internal sealed partial class ComponentFactory_Tests : OurRobustUnitTest { private const string TestComponentName = "A"; private const string LowercaseTestComponentName = "a"; diff --git a/Robust.UnitTesting/Shared/GameObjects/ContainerTests.cs b/Robust.Shared.IntegrationTests/GameObjects/ContainerTests.cs similarity index 99% rename from Robust.UnitTesting/Shared/GameObjects/ContainerTests.cs rename to Robust.Shared.IntegrationTests/GameObjects/ContainerTests.cs index 4e94b264e..28b38f3f7 100644 --- a/Robust.UnitTesting/Shared/GameObjects/ContainerTests.cs +++ b/Robust.Shared.IntegrationTests/GameObjects/ContainerTests.cs @@ -15,7 +15,7 @@ using Robust.Shared.Utility; namespace Robust.UnitTesting.Shared.GameObjects { - public sealed class ContainerTests : RobustIntegrationTest + internal sealed class ContainerTests : RobustIntegrationTest { /// /// Tests container states with children that do not exist on the client diff --git a/Robust.UnitTesting/Shared/GameObjects/DeferredEntityDeletionTest.cs b/Robust.Shared.IntegrationTests/GameObjects/DeferredEntityDeletionTest.cs similarity index 98% rename from Robust.UnitTesting/Shared/GameObjects/DeferredEntityDeletionTest.cs rename to Robust.Shared.IntegrationTests/GameObjects/DeferredEntityDeletionTest.cs index 09bdd9216..5bb02e61d 100644 --- a/Robust.UnitTesting/Shared/GameObjects/DeferredEntityDeletionTest.cs +++ b/Robust.Shared.IntegrationTests/GameObjects/DeferredEntityDeletionTest.cs @@ -7,7 +7,7 @@ using Robust.Shared.Reflection; namespace Robust.UnitTesting.Shared.GameObjects; -public sealed partial class DeferredEntityDeletionTest : RobustIntegrationTest +internal sealed partial class DeferredEntityDeletionTest : RobustIntegrationTest { // This test ensures that deferred deletion can be used while handling events without issue, and that deleting an // entity after deferring component removal doesn't cause any issues. diff --git a/Robust.UnitTesting/Shared/GameObjects/EntityEventBusTests.ComponentEvent.cs b/Robust.Shared.IntegrationTests/GameObjects/EntityEventBusTests.ComponentEvent.cs similarity index 99% rename from Robust.UnitTesting/Shared/GameObjects/EntityEventBusTests.ComponentEvent.cs rename to Robust.Shared.IntegrationTests/GameObjects/EntityEventBusTests.ComponentEvent.cs index 5ce870211..4db6224e8 100644 --- a/Robust.UnitTesting/Shared/GameObjects/EntityEventBusTests.ComponentEvent.cs +++ b/Robust.Shared.IntegrationTests/GameObjects/EntityEventBusTests.ComponentEvent.cs @@ -7,7 +7,7 @@ using Robust.UnitTesting.Server; namespace Robust.UnitTesting.Shared.GameObjects { - public sealed partial class EntityEventBusTests + internal sealed partial class EntityEventBusTests { [Test] public void SubscribeCompEvent() diff --git a/Robust.UnitTesting/Shared/GameObjects/EntityEventBusTests.OrderedEvents.cs b/Robust.Shared.IntegrationTests/GameObjects/EntityEventBusTests.OrderedEvents.cs similarity index 98% rename from Robust.UnitTesting/Shared/GameObjects/EntityEventBusTests.OrderedEvents.cs rename to Robust.Shared.IntegrationTests/GameObjects/EntityEventBusTests.OrderedEvents.cs index 5b655d240..ce7dd52c3 100644 --- a/Robust.UnitTesting/Shared/GameObjects/EntityEventBusTests.OrderedEvents.cs +++ b/Robust.Shared.IntegrationTests/GameObjects/EntityEventBusTests.OrderedEvents.cs @@ -7,7 +7,7 @@ using Robust.UnitTesting.Server; namespace Robust.UnitTesting.Shared.GameObjects; -public sealed partial class EntityEventBusTests +internal sealed partial class EntityEventBusTests { // Explanation of what bug this is testing: // Because event ordering is keyed on system type, we have a problem. diff --git a/Robust.UnitTesting/Shared/GameObjects/EntityEventBusTests.RefBroadcastEvents.cs b/Robust.Shared.IntegrationTests/GameObjects/EntityEventBusTests.RefBroadcastEvents.cs similarity index 97% rename from Robust.UnitTesting/Shared/GameObjects/EntityEventBusTests.RefBroadcastEvents.cs rename to Robust.Shared.IntegrationTests/GameObjects/EntityEventBusTests.RefBroadcastEvents.cs index ad8932a61..f2238dee6 100644 --- a/Robust.UnitTesting/Shared/GameObjects/EntityEventBusTests.RefBroadcastEvents.cs +++ b/Robust.Shared.IntegrationTests/GameObjects/EntityEventBusTests.RefBroadcastEvents.cs @@ -7,7 +7,7 @@ using Robust.UnitTesting.Server; namespace Robust.UnitTesting.Shared.GameObjects { [TestFixture] - public partial class EntityEventBusTests + internal sealed partial class EntityEventBusTests { [Test] public void SubscribeCompRefBroadcastEvent() @@ -24,7 +24,7 @@ namespace Robust.UnitTesting.Shared.GameObjects } [Reflect(false)] - public sealed class SubscribeCompRefBroadcastSystem : EntitySystem + internal sealed class SubscribeCompRefBroadcastSystem : EntitySystem { public override void Initialize() { diff --git a/Robust.UnitTesting/Shared/GameObjects/EntityEventBusTests.RefDirectedEvents.cs b/Robust.Shared.IntegrationTests/GameObjects/EntityEventBusTests.RefDirectedEvents.cs similarity index 99% rename from Robust.UnitTesting/Shared/GameObjects/EntityEventBusTests.RefDirectedEvents.cs rename to Robust.Shared.IntegrationTests/GameObjects/EntityEventBusTests.RefDirectedEvents.cs index c2f1ef3dd..ecf246f52 100644 --- a/Robust.UnitTesting/Shared/GameObjects/EntityEventBusTests.RefDirectedEvents.cs +++ b/Robust.Shared.IntegrationTests/GameObjects/EntityEventBusTests.RefDirectedEvents.cs @@ -7,7 +7,7 @@ using Robust.UnitTesting.Server; namespace Robust.UnitTesting.Shared.GameObjects { - public partial class EntityEventBusTests + internal sealed partial class EntityEventBusTests { [Test] diff --git a/Robust.UnitTesting/Shared/GameObjects/EntityEventBusTests.RefSortedEvents.cs b/Robust.Shared.IntegrationTests/GameObjects/EntityEventBusTests.RefSortedEvents.cs similarity index 80% rename from Robust.UnitTesting/Shared/GameObjects/EntityEventBusTests.RefSortedEvents.cs rename to Robust.Shared.IntegrationTests/GameObjects/EntityEventBusTests.RefSortedEvents.cs index 8cdcd8c78..2aff82670 100644 --- a/Robust.UnitTesting/Shared/GameObjects/EntityEventBusTests.RefSortedEvents.cs +++ b/Robust.Shared.IntegrationTests/GameObjects/EntityEventBusTests.RefSortedEvents.cs @@ -7,7 +7,7 @@ using Robust.UnitTesting.Server; namespace Robust.UnitTesting.Shared.GameObjects { - public partial class EntityEventBusTests + internal sealed partial class EntityEventBusTests { } diff --git a/Robust.UnitTesting/Shared/GameObjects/EntityEventBusTests.SystemEvent.cs b/Robust.Shared.IntegrationTests/GameObjects/EntityEventBusTests.SystemEvent.cs similarity index 98% rename from Robust.UnitTesting/Shared/GameObjects/EntityEventBusTests.SystemEvent.cs rename to Robust.Shared.IntegrationTests/GameObjects/EntityEventBusTests.SystemEvent.cs index eb21d0bcf..1062e04f1 100644 --- a/Robust.UnitTesting/Shared/GameObjects/EntityEventBusTests.SystemEvent.cs +++ b/Robust.Shared.IntegrationTests/GameObjects/EntityEventBusTests.SystemEvent.cs @@ -6,7 +6,7 @@ using Robust.UnitTesting.Server; namespace Robust.UnitTesting.Shared.GameObjects { [TestFixture, Parallelizable, TestOf(typeof(EntityEventBus))] - public partial class EntityEventBusTests + internal sealed partial class EntityEventBusTests { private static (EntityEventBus Bus, ISimulation Sim, EntityUid Uid, MetaDataComponent Comp) EntFactory() { @@ -488,15 +488,15 @@ namespace Robust.UnitTesting.Shared.GameObjects Assert.That(c, Is.True, "C did not fire"); } - public sealed class SubA : IEntityEventSubscriber + internal sealed class SubA : IEntityEventSubscriber { } - public sealed class SubB : IEntityEventSubscriber + internal sealed class SubB : IEntityEventSubscriber { } - public sealed class SubC : IEntityEventSubscriber + internal sealed class SubC : IEntityEventSubscriber { } } diff --git a/Robust.UnitTesting/Shared/GameObjects/EntityManagerCopyTests.cs b/Robust.Shared.IntegrationTests/GameObjects/EntityManagerCopyTests.cs similarity index 99% rename from Robust.UnitTesting/Shared/GameObjects/EntityManagerCopyTests.cs rename to Robust.Shared.IntegrationTests/GameObjects/EntityManagerCopyTests.cs index c9e098e9c..bb0803d42 100644 --- a/Robust.UnitTesting/Shared/GameObjects/EntityManagerCopyTests.cs +++ b/Robust.Shared.IntegrationTests/GameObjects/EntityManagerCopyTests.cs @@ -8,7 +8,7 @@ using Robust.UnitTesting.Server; namespace Robust.UnitTesting.Shared.GameObjects; [TestFixture] -public sealed partial class EntityManagerCopyTests +internal sealed partial class EntityManagerCopyTests { [Test] public void CopyComponentGeneric() diff --git a/Robust.UnitTesting/Shared/GameObjects/EntityManager_Components_Tests.cs b/Robust.Shared.IntegrationTests/GameObjects/EntityManager_Components_Tests.cs similarity index 99% rename from Robust.UnitTesting/Shared/GameObjects/EntityManager_Components_Tests.cs rename to Robust.Shared.IntegrationTests/GameObjects/EntityManager_Components_Tests.cs index 44d735503..3ec3301ae 100644 --- a/Robust.UnitTesting/Shared/GameObjects/EntityManager_Components_Tests.cs +++ b/Robust.Shared.IntegrationTests/GameObjects/EntityManager_Components_Tests.cs @@ -14,7 +14,7 @@ using Robust.UnitTesting.Server; namespace Robust.UnitTesting.Shared.GameObjects { [TestFixture, Parallelizable ,TestOf(typeof(EntityManager))] - public sealed partial class EntityManager_Components_Tests + internal sealed partial class EntityManager_Components_Tests { private const string DummyLoadId = "DummyLoad"; private const string DummyLoad = $@" diff --git a/Robust.UnitTesting/Shared/GameObjects/EntityState_Tests.cs b/Robust.Shared.IntegrationTests/GameObjects/EntityState_Tests.cs similarity index 100% rename from Robust.UnitTesting/Shared/GameObjects/EntityState_Tests.cs rename to Robust.Shared.IntegrationTests/GameObjects/EntityState_Tests.cs diff --git a/Robust.UnitTesting/Shared/GameObjects/EntitySystemManagerOrderTest.cs b/Robust.Shared.IntegrationTests/GameObjects/EntitySystemManagerOrderTest.cs similarity index 98% rename from Robust.UnitTesting/Shared/GameObjects/EntitySystemManagerOrderTest.cs rename to Robust.Shared.IntegrationTests/GameObjects/EntitySystemManagerOrderTest.cs index 70cee4e87..8cf31f528 100644 --- a/Robust.UnitTesting/Shared/GameObjects/EntitySystemManagerOrderTest.cs +++ b/Robust.Shared.IntegrationTests/GameObjects/EntitySystemManagerOrderTest.cs @@ -20,7 +20,7 @@ namespace Robust.UnitTesting.Shared.GameObjects { [TestFixture] [TestOf(typeof(EntitySystemManager))] - public sealed class EntitySystemManagerOrderTest + internal sealed class EntitySystemManagerOrderTest { private sealed class Counter { diff --git a/Robust.UnitTesting/Shared/GameObjects/EntitySystemManager_Tests.cs b/Robust.Shared.IntegrationTests/GameObjects/EntitySystemManager_Tests.cs similarity index 92% rename from Robust.UnitTesting/Shared/GameObjects/EntitySystemManager_Tests.cs rename to Robust.Shared.IntegrationTests/GameObjects/EntitySystemManager_Tests.cs index 4244273de..8a9aa869e 100644 --- a/Robust.UnitTesting/Shared/GameObjects/EntitySystemManager_Tests.cs +++ b/Robust.Shared.IntegrationTests/GameObjects/EntitySystemManager_Tests.cs @@ -10,7 +10,7 @@ using Robust.Shared.IoC.Exceptions; namespace Robust.UnitTesting.Shared.GameObjects { [TestFixture, TestOf(typeof(EntitySystemManager))] - public sealed class EntitySystemManager_Tests: RobustUnitTest + internal sealed class EntitySystemManager_Tests: OurRobustUnitTest { public abstract class ESystemBase : IEntitySystem @@ -25,16 +25,16 @@ namespace Robust.UnitTesting.Shared.GameObjects } [Virtual] public class ESystemA : ESystemBase { } - public sealed class ESystemC : ESystemA { } + internal sealed class ESystemC : ESystemA { } public abstract class ESystemBase2 : ESystemBase { } - public sealed class ESystemB : ESystemBase2 { } + internal sealed class ESystemB : ESystemBase2 { } - public sealed class ESystemDepA : ESystemBase + internal sealed class ESystemDepA : ESystemBase { [Dependency] public readonly ESystemDepB ESystemDepB = default!; } - public sealed class ESystemDepB : ESystemBase + internal sealed class ESystemDepB : ESystemBase { [Dependency] public readonly ESystemDepA ESystemDepA = default!; } diff --git a/Robust.UnitTesting/Shared/GameObjects/GenericEntityPrint.cs b/Robust.Shared.IntegrationTests/GameObjects/GenericEntityPrint.cs similarity index 99% rename from Robust.UnitTesting/Shared/GameObjects/GenericEntityPrint.cs rename to Robust.Shared.IntegrationTests/GameObjects/GenericEntityPrint.cs index c1fc54a88..40fc96c7c 100644 --- a/Robust.UnitTesting/Shared/GameObjects/GenericEntityPrint.cs +++ b/Robust.Shared.IntegrationTests/GameObjects/GenericEntityPrint.cs @@ -5,7 +5,7 @@ using System.Text; namespace Robust.UnitTesting.Shared.GameObjects; -public sealed class GenericEntityPrint +internal sealed class GenericEntityPrint { //[Test] public void Print() diff --git a/Robust.UnitTesting/Shared/GameObjects/IEntityManagerTests.cs b/Robust.Shared.IntegrationTests/GameObjects/IEntityManagerTests.cs similarity index 100% rename from Robust.UnitTesting/Shared/GameObjects/IEntityManagerTests.cs rename to Robust.Shared.IntegrationTests/GameObjects/IEntityManagerTests.cs diff --git a/Robust.UnitTesting/Shared/GameObjects/Systems/AnchoredSystemTests.cs b/Robust.Shared.IntegrationTests/GameObjects/Systems/AnchoredSystemTests.cs similarity index 99% rename from Robust.UnitTesting/Shared/GameObjects/Systems/AnchoredSystemTests.cs rename to Robust.Shared.IntegrationTests/GameObjects/Systems/AnchoredSystemTests.cs index aca41d0d8..0e90228dd 100644 --- a/Robust.UnitTesting/Shared/GameObjects/Systems/AnchoredSystemTests.cs +++ b/Robust.Shared.IntegrationTests/GameObjects/Systems/AnchoredSystemTests.cs @@ -17,7 +17,7 @@ using Robust.UnitTesting.Server; namespace Robust.UnitTesting.Shared.GameObjects.Systems { [TestFixture, Parallelizable] - public sealed partial class AnchoredSystemTests + internal sealed partial class AnchoredSystemTests { private const string Prototypes = @" - type: entity diff --git a/Robust.UnitTesting/Shared/GameObjects/Systems/TransformSystemTests.cs b/Robust.Shared.IntegrationTests/GameObjects/Systems/TransformSystemTests.cs similarity index 100% rename from Robust.UnitTesting/Shared/GameObjects/Systems/TransformSystemTests.cs rename to Robust.Shared.IntegrationTests/GameObjects/Systems/TransformSystemTests.cs diff --git a/Robust.UnitTesting/Shared/GameObjects/TransformComponent_Tests.cs b/Robust.Shared.IntegrationTests/GameObjects/TransformComponent_Tests.cs similarity index 98% rename from Robust.UnitTesting/Shared/GameObjects/TransformComponent_Tests.cs rename to Robust.Shared.IntegrationTests/GameObjects/TransformComponent_Tests.cs index 7e151e089..aeb951a11 100644 --- a/Robust.UnitTesting/Shared/GameObjects/TransformComponent_Tests.cs +++ b/Robust.Shared.IntegrationTests/GameObjects/TransformComponent_Tests.cs @@ -10,7 +10,7 @@ using Robust.UnitTesting.Server; namespace Robust.UnitTesting.Shared.GameObjects { [TestFixture] - public sealed class TransformComponent_Tests + internal sealed class TransformComponent_Tests { /// /// Verify that WorldPosition and WorldRotation return the same result as the faster helper method. diff --git a/Robust.UnitTesting/Shared/GameState/AutoNetworkingTest.cs b/Robust.Shared.IntegrationTests/GameState/AutoNetworkingTest.cs similarity index 98% rename from Robust.UnitTesting/Shared/GameState/AutoNetworkingTest.cs rename to Robust.Shared.IntegrationTests/GameState/AutoNetworkingTest.cs index b6986f61c..56845abec 100644 --- a/Robust.UnitTesting/Shared/GameState/AutoNetworkingTest.cs +++ b/Robust.Shared.IntegrationTests/GameState/AutoNetworkingTest.cs @@ -2,6 +2,7 @@ using System.Linq; using System.Threading.Tasks; using NUnit.Framework; using Robust.Shared; +using Robust.Shared.Analyzers; using Robust.Shared.GameObjects; using Robust.Shared.GameStates; using Robust.Shared.Map; @@ -10,7 +11,7 @@ using Robust.Shared.Serialization.Manager.Attributes; namespace Robust.UnitTesting.Shared.GameState; -public sealed partial class AutoNetworkingTests : RobustIntegrationTest +internal sealed partial class AutoNetworkingTests : RobustIntegrationTest { /// /// Does basic testing for AutoNetworkedFieldAttribute and AutoGenerateComponentStateAttribute diff --git a/Robust.UnitTesting/Shared/GameState/ComponentStateTests.cs b/Robust.Shared.IntegrationTests/GameState/ComponentStateTests.cs similarity index 99% rename from Robust.UnitTesting/Shared/GameState/ComponentStateTests.cs rename to Robust.Shared.IntegrationTests/GameState/ComponentStateTests.cs index 4bf73e4ee..8e2e63948 100644 --- a/Robust.UnitTesting/Shared/GameState/ComponentStateTests.cs +++ b/Robust.Shared.IntegrationTests/GameState/ComponentStateTests.cs @@ -3,6 +3,7 @@ using System.Numerics; using System.Threading.Tasks; using NUnit.Framework; using Robust.Shared; +using Robust.Shared.Analyzers; using Robust.Shared.GameObjects; using Robust.Shared.GameStates; using Robust.Shared.IoC; @@ -13,7 +14,7 @@ using Robust.Shared.Serialization.Manager.Attributes; namespace Robust.UnitTesting.Shared.GameState; -public sealed partial class ComponentStateTests : RobustIntegrationTest +internal sealed partial class ComponentStateTests : RobustIntegrationTest { /// /// This tests performs a basic check to ensure that there is no issue with entity states referencing other diff --git a/Robust.UnitTesting/Shared/GameState/DeletionNetworkingTests.cs b/Robust.Shared.IntegrationTests/GameState/DeletionNetworkingTests.cs similarity index 99% rename from Robust.UnitTesting/Shared/GameState/DeletionNetworkingTests.cs rename to Robust.Shared.IntegrationTests/GameState/DeletionNetworkingTests.cs index 46e1be18b..48b050625 100644 --- a/Robust.UnitTesting/Shared/GameState/DeletionNetworkingTests.cs +++ b/Robust.Shared.IntegrationTests/GameState/DeletionNetworkingTests.cs @@ -18,7 +18,7 @@ namespace Robust.UnitTesting.Shared.GameState; /// /// Should help prevent the issue fixed in PR #4044 from reoccurring. /// -public sealed class DeletionNetworkingTests : RobustIntegrationTest +internal sealed class DeletionNetworkingTests : RobustIntegrationTest { [Test] public async Task DeletionNetworkingTest() diff --git a/Robust.UnitTesting/Shared/GameState/NoSharedReferencesTest.cs b/Robust.Shared.IntegrationTests/GameState/NoSharedReferencesTest.cs similarity index 97% rename from Robust.UnitTesting/Shared/GameState/NoSharedReferencesTest.cs rename to Robust.Shared.IntegrationTests/GameState/NoSharedReferencesTest.cs index 8d812e0c2..9313bede3 100644 --- a/Robust.UnitTesting/Shared/GameState/NoSharedReferencesTest.cs +++ b/Robust.Shared.IntegrationTests/GameState/NoSharedReferencesTest.cs @@ -7,6 +7,7 @@ using Robust.Shared.Network; using Robust.Shared.Serialization; using System.Linq; using System.Threading.Tasks; +using Robust.Shared.Analyzers; using static Robust.UnitTesting.Shared.GameState.ExampleAutogeneratedComponent; namespace Robust.UnitTesting.Shared.GameState; @@ -14,7 +15,7 @@ namespace Robust.UnitTesting.Shared.GameState; /// /// This is a test of test engine . Not a test of game engine. /// -public sealed partial class NoSharedReferencesTest : RobustIntegrationTest +internal sealed partial class NoSharedReferencesTest : RobustIntegrationTest { /// /// The test performs a basic check to ensure that there is no issue with server's object references leaking to client. diff --git a/Robust.UnitTesting/Shared/GameState/VisibilityTest.cs b/Robust.Shared.IntegrationTests/GameState/VisibilityTest.cs similarity index 98% rename from Robust.UnitTesting/Shared/GameState/VisibilityTest.cs rename to Robust.Shared.IntegrationTests/GameState/VisibilityTest.cs index a411c8117..30e2ef58d 100644 --- a/Robust.UnitTesting/Shared/GameState/VisibilityTest.cs +++ b/Robust.Shared.IntegrationTests/GameState/VisibilityTest.cs @@ -13,7 +13,7 @@ using Robust.Shared.Network; namespace Robust.UnitTesting.Shared.GameState; -public sealed partial class VisibilityTest : RobustIntegrationTest +internal sealed partial class VisibilityTest : RobustIntegrationTest { /// /// This tests checks that entity visibility masks are recursively applied to children. diff --git a/Robust.Shared.IntegrationTests/GlobalUsings.cs b/Robust.Shared.IntegrationTests/GlobalUsings.cs new file mode 100644 index 000000000..316ff0ec5 --- /dev/null +++ b/Robust.Shared.IntegrationTests/GlobalUsings.cs @@ -0,0 +1 @@ +global using Is = NUnit.Framework.Is; diff --git a/Robust.UnitTesting/Shared/Input/Binding/CommandBindRegistry_Test.cs b/Robust.Shared.IntegrationTests/Input/Binding/CommandBindRegistry_Test.cs similarity index 99% rename from Robust.UnitTesting/Shared/Input/Binding/CommandBindRegistry_Test.cs rename to Robust.Shared.IntegrationTests/Input/Binding/CommandBindRegistry_Test.cs index ea0093e2e..ba25d901d 100644 --- a/Robust.UnitTesting/Shared/Input/Binding/CommandBindRegistry_Test.cs +++ b/Robust.Shared.IntegrationTests/Input/Binding/CommandBindRegistry_Test.cs @@ -10,7 +10,7 @@ using Robust.Shared.Player; namespace Robust.UnitTesting.Shared.Input.Binding { [TestFixture, TestOf(typeof(CommandBindRegistry))] - public sealed class CommandBindRegistry_Test : RobustUnitTest + internal sealed class CommandBindRegistry_Test : OurRobustUnitTest { private sealed class TypeA { } diff --git a/Robust.UnitTesting/Shared/Localization/LoadLocalizationTest.cs b/Robust.Shared.IntegrationTests/Localization/LoadLocalizationTest.cs similarity index 94% rename from Robust.UnitTesting/Shared/Localization/LoadLocalizationTest.cs rename to Robust.Shared.IntegrationTests/Localization/LoadLocalizationTest.cs index a2fe3ee03..ced79aaed 100644 --- a/Robust.UnitTesting/Shared/Localization/LoadLocalizationTest.cs +++ b/Robust.Shared.IntegrationTests/Localization/LoadLocalizationTest.cs @@ -10,7 +10,7 @@ using Robust.Shared.Log; namespace Robust.UnitTesting.Shared.Localization; [TestFixture] -public sealed class LoadLocalizationTest : RobustUnitTest +internal sealed class LoadLocalizationTest : OurRobustUnitTest { private const string DuplicateTerm = @" term1 = 1 diff --git a/Robust.UnitTesting/Shared/Localization/LocalizationTests.cs b/Robust.Shared.IntegrationTests/Localization/LocalizationTests.cs similarity index 99% rename from Robust.UnitTesting/Shared/Localization/LocalizationTests.cs rename to Robust.Shared.IntegrationTests/Localization/LocalizationTests.cs index 63450749a..e630f0981 100644 --- a/Robust.UnitTesting/Shared/Localization/LocalizationTests.cs +++ b/Robust.Shared.IntegrationTests/Localization/LocalizationTests.cs @@ -14,7 +14,7 @@ using Robust.Shared.Utility; namespace Robust.UnitTesting.Shared.Localization { [TestFixture] - internal sealed class LocalizationTests : RobustUnitTest + internal sealed class LocalizationTests : OurRobustUnitTest { protected override Type[] ExtraComponents => new[] {typeof(GrammarComponent)}; diff --git a/Robust.UnitTesting/Shared/Map/EntityCoordinates_Tests.cs b/Robust.Shared.IntegrationTests/Map/EntityCoordinates_Tests.cs similarity index 99% rename from Robust.UnitTesting/Shared/Map/EntityCoordinates_Tests.cs rename to Robust.Shared.IntegrationTests/Map/EntityCoordinates_Tests.cs index 353a4ab49..f43ccb44f 100644 --- a/Robust.UnitTesting/Shared/Map/EntityCoordinates_Tests.cs +++ b/Robust.Shared.IntegrationTests/Map/EntityCoordinates_Tests.cs @@ -10,7 +10,7 @@ using Robust.Shared.Serialization.Manager; namespace Robust.UnitTesting.Shared.Map { [TestFixture, Parallelizable, TestOf(typeof(EntityCoordinates))] - public sealed class EntityCoordinates_Tests : RobustUnitTest + internal sealed class EntityCoordinates_Tests : OurRobustUnitTest { [OneTimeSetUp] public void Setup() diff --git a/Robust.UnitTesting/Shared/Map/GridChunkPartition_Tests.cs b/Robust.Shared.IntegrationTests/Map/GridChunkPartition_Tests.cs similarity index 96% rename from Robust.UnitTesting/Shared/Map/GridChunkPartition_Tests.cs rename to Robust.Shared.IntegrationTests/Map/GridChunkPartition_Tests.cs index 0e06d3ecd..0e88a13a4 100644 --- a/Robust.UnitTesting/Shared/Map/GridChunkPartition_Tests.cs +++ b/Robust.Shared.IntegrationTests/Map/GridChunkPartition_Tests.cs @@ -5,7 +5,7 @@ using Robust.Shared.Maths; namespace Robust.UnitTesting.Shared.Map { [TestFixture, Parallelizable, TestOf(typeof(GridChunkPartition))] - internal sealed class GridChunkPartition_Tests : RobustUnitTest + internal sealed class GridChunkPartition_Tests : OurRobustUnitTest { // origin is top left private static readonly int[] _testMiscTiles = { diff --git a/Robust.UnitTesting/Shared/Map/GridCollision_Test.cs b/Robust.Shared.IntegrationTests/Map/GridCollision_Test.cs similarity index 98% rename from Robust.UnitTesting/Shared/Map/GridCollision_Test.cs rename to Robust.Shared.IntegrationTests/Map/GridCollision_Test.cs index afb9309bb..b3726f199 100644 --- a/Robust.UnitTesting/Shared/Map/GridCollision_Test.cs +++ b/Robust.Shared.IntegrationTests/Map/GridCollision_Test.cs @@ -10,7 +10,7 @@ using Robust.Shared.Physics.Systems; namespace Robust.UnitTesting.Shared.Map { - public sealed class GridCollision_Test : RobustIntegrationTest + internal sealed class GridCollision_Test : RobustIntegrationTest { [Test] public async Task TestGridsCollide() diff --git a/Robust.UnitTesting/Shared/Map/GridContraction_Test.cs b/Robust.Shared.IntegrationTests/Map/GridContraction_Test.cs similarity index 97% rename from Robust.UnitTesting/Shared/Map/GridContraction_Test.cs rename to Robust.Shared.IntegrationTests/Map/GridContraction_Test.cs index 5bd139677..a2eb87253 100644 --- a/Robust.UnitTesting/Shared/Map/GridContraction_Test.cs +++ b/Robust.Shared.IntegrationTests/Map/GridContraction_Test.cs @@ -8,7 +8,7 @@ using Robust.Shared.Maths; namespace Robust.UnitTesting.Shared.Map { [TestFixture] - public sealed class GridContraction_Test : RobustIntegrationTest + internal sealed class GridContraction_Test : RobustIntegrationTest { [Test] public async Task TestGridDeletes() diff --git a/Robust.UnitTesting/Shared/Map/GridFixtures_Tests.cs b/Robust.Shared.IntegrationTests/Map/GridFixtures_Tests.cs similarity index 98% rename from Robust.UnitTesting/Shared/Map/GridFixtures_Tests.cs rename to Robust.Shared.IntegrationTests/Map/GridFixtures_Tests.cs index 2e997c3b2..f7374c83b 100644 --- a/Robust.UnitTesting/Shared/Map/GridFixtures_Tests.cs +++ b/Robust.Shared.IntegrationTests/Map/GridFixtures_Tests.cs @@ -18,7 +18,7 @@ namespace Robust.UnitTesting.Shared.Map; /// [Parallelizable(ParallelScope.All)] [TestFixture] -public sealed class GridFixtures_Tests : RobustIntegrationTest +internal sealed class GridFixtures_Tests : RobustIntegrationTest { /// /// Tests that grid fixtures match what's expected. diff --git a/Robust.UnitTesting/Shared/Map/GridMerge_Tests.cs b/Robust.Shared.IntegrationTests/Map/GridMerge_Tests.cs similarity index 98% rename from Robust.UnitTesting/Shared/Map/GridMerge_Tests.cs rename to Robust.Shared.IntegrationTests/Map/GridMerge_Tests.cs index 903452834..0ff7aa9c4 100644 --- a/Robust.UnitTesting/Shared/Map/GridMerge_Tests.cs +++ b/Robust.Shared.IntegrationTests/Map/GridMerge_Tests.cs @@ -13,7 +13,7 @@ namespace Robust.UnitTesting.Shared.Map; [Parallelizable(ParallelScope.All | ParallelScope.Fixtures)] [TestFixture] -public sealed class GridMerge_Tests +internal sealed class GridMerge_Tests { private ISimulation GetSim() { diff --git a/Robust.UnitTesting/Shared/Map/GridRotation_Tests.cs b/Robust.Shared.IntegrationTests/Map/GridRotation_Tests.cs similarity index 98% rename from Robust.UnitTesting/Shared/Map/GridRotation_Tests.cs rename to Robust.Shared.IntegrationTests/Map/GridRotation_Tests.cs index 373ac2073..d73e86ff9 100644 --- a/Robust.UnitTesting/Shared/Map/GridRotation_Tests.cs +++ b/Robust.Shared.IntegrationTests/Map/GridRotation_Tests.cs @@ -10,7 +10,7 @@ using Robust.Shared.Maths; namespace Robust.UnitTesting.Shared.Map { [TestFixture] - public sealed class GridRotation_Tests : RobustIntegrationTest + internal sealed class GridRotation_Tests : RobustIntegrationTest { // Because integration tests are ten billion percent easier we'll just do all the rotation tests here. // These are mainly looking out for situations where the grid is rotated 90 / 180 degrees and we diff --git a/Robust.UnitTesting/Shared/Map/GridSplit_Tests.cs b/Robust.Shared.IntegrationTests/Map/GridSplit_Tests.cs similarity index 99% rename from Robust.UnitTesting/Shared/Map/GridSplit_Tests.cs rename to Robust.Shared.IntegrationTests/Map/GridSplit_Tests.cs index 4e946944d..447c4ea94 100644 --- a/Robust.UnitTesting/Shared/Map/GridSplit_Tests.cs +++ b/Robust.Shared.IntegrationTests/Map/GridSplit_Tests.cs @@ -12,7 +12,7 @@ namespace Robust.UnitTesting.Shared.Map; [Parallelizable(ParallelScope.All | ParallelScope.Fixtures)] [TestFixture] -public sealed class GridSplit_Tests +internal sealed class GridSplit_Tests { private ISimulation GetSim() { diff --git a/Robust.UnitTesting/Shared/Map/MapGridMap_Tests.cs b/Robust.Shared.IntegrationTests/Map/MapGridMap_Tests.cs similarity index 97% rename from Robust.UnitTesting/Shared/Map/MapGridMap_Tests.cs rename to Robust.Shared.IntegrationTests/Map/MapGridMap_Tests.cs index c953b8ea3..7c6fef1c5 100644 --- a/Robust.UnitTesting/Shared/Map/MapGridMap_Tests.cs +++ b/Robust.Shared.IntegrationTests/Map/MapGridMap_Tests.cs @@ -10,7 +10,7 @@ using Robust.UnitTesting.Server; namespace Robust.UnitTesting.Shared.Map; [TestFixture] -public sealed class MapGridMap_Tests +internal sealed class MapGridMap_Tests { /// /// Asserts FindGrids only returns the map once. diff --git a/Robust.UnitTesting/Shared/Map/MapGrid_Tests.cs b/Robust.Shared.IntegrationTests/Map/MapGrid_Tests.cs similarity index 100% rename from Robust.UnitTesting/Shared/Map/MapGrid_Tests.cs rename to Robust.Shared.IntegrationTests/Map/MapGrid_Tests.cs diff --git a/Robust.UnitTesting/Shared/Map/MapManager_Tests.cs b/Robust.Shared.IntegrationTests/Map/MapManager_Tests.cs similarity index 98% rename from Robust.UnitTesting/Shared/Map/MapManager_Tests.cs rename to Robust.Shared.IntegrationTests/Map/MapManager_Tests.cs index b7fc1c257..12d4a4604 100644 --- a/Robust.UnitTesting/Shared/Map/MapManager_Tests.cs +++ b/Robust.Shared.IntegrationTests/Map/MapManager_Tests.cs @@ -8,7 +8,7 @@ using Robust.UnitTesting.Server; namespace Robust.UnitTesting.Shared.Map { [TestFixture, TestOf(typeof(MapManager))] - public sealed class MapManagerTests + internal sealed class MapManagerTests { private static ISimulation SimulationFactory() { diff --git a/Robust.UnitTesting/Shared/Map/MapPauseTests.cs b/Robust.Shared.IntegrationTests/Map/MapPauseTests.cs similarity index 100% rename from Robust.UnitTesting/Shared/Map/MapPauseTests.cs rename to Robust.Shared.IntegrationTests/Map/MapPauseTests.cs diff --git a/Robust.UnitTesting/Shared/Map/Query_Tests.cs b/Robust.Shared.IntegrationTests/Map/Query_Tests.cs similarity index 98% rename from Robust.UnitTesting/Shared/Map/Query_Tests.cs rename to Robust.Shared.IntegrationTests/Map/Query_Tests.cs index 22d229c72..ed6b1f369 100644 --- a/Robust.UnitTesting/Shared/Map/Query_Tests.cs +++ b/Robust.Shared.IntegrationTests/Map/Query_Tests.cs @@ -11,7 +11,7 @@ using Robust.UnitTesting.Server; namespace Robust.UnitTesting.Shared.Map; [TestFixture] -public sealed class Query_Tests +internal sealed class Query_Tests { private static readonly TestCaseData[] Box2Data = new[] { diff --git a/Robust.UnitTesting/Shared/Map/SingleTileRemoveTest.cs b/Robust.Shared.IntegrationTests/Map/SingleTileRemoveTest.cs similarity index 98% rename from Robust.UnitTesting/Shared/Map/SingleTileRemoveTest.cs rename to Robust.Shared.IntegrationTests/Map/SingleTileRemoveTest.cs index 7a2a2b4fb..ada8ffa7d 100644 --- a/Robust.UnitTesting/Shared/Map/SingleTileRemoveTest.cs +++ b/Robust.Shared.IntegrationTests/Map/SingleTileRemoveTest.cs @@ -13,7 +13,7 @@ using Robust.Shared.Player; namespace Robust.UnitTesting.Shared.Map; -public sealed class GridDeleteSingleTileRemoveTestTest : RobustIntegrationTest +internal sealed class GridDeleteSingleTileRemoveTestTest : RobustIntegrationTest { /// /// Spawns a simple 1-tile grid with an entity on it, and then sets the tile to "space". diff --git a/Robust.UnitTesting/Shared/Networking/DisconnectTest.cs b/Robust.Shared.IntegrationTests/Networking/DisconnectTest.cs similarity index 98% rename from Robust.UnitTesting/Shared/Networking/DisconnectTest.cs rename to Robust.Shared.IntegrationTests/Networking/DisconnectTest.cs index cd9e19f82..0bb12a717 100644 --- a/Robust.UnitTesting/Shared/Networking/DisconnectTest.cs +++ b/Robust.Shared.IntegrationTests/Networking/DisconnectTest.cs @@ -16,7 +16,7 @@ using sIPlayerManager = Robust.Server.Player.IPlayerManager; namespace Robust.UnitTesting.Shared.Networking; -public sealed class DisconnectTest : RobustIntegrationTest +internal sealed class DisconnectTest : RobustIntegrationTest { /// /// Check that client disconnection works as expected. This is effectively a test of diff --git a/Robust.Shared.IntegrationTests/OurRobustUnitTest.cs b/Robust.Shared.IntegrationTests/OurRobustUnitTest.cs new file mode 100644 index 000000000..781f43bf2 --- /dev/null +++ b/Robust.Shared.IntegrationTests/OurRobustUnitTest.cs @@ -0,0 +1,11 @@ +using System.Reflection; + +namespace Robust.UnitTesting.Shared; + +internal abstract class OurRobustUnitTest : RobustUnitTest +{ + protected override Assembly[] GetContentAssemblies() + { + return [typeof(OurRobustUnitTest).Assembly]; + } +} diff --git a/Robust.UnitTesting/Shared/Physics/BroadphaseNetworkingTest.cs b/Robust.Shared.IntegrationTests/Physics/BroadphaseNetworkingTest.cs similarity index 98% rename from Robust.UnitTesting/Shared/Physics/BroadphaseNetworkingTest.cs rename to Robust.Shared.IntegrationTests/Physics/BroadphaseNetworkingTest.cs index a020ad2ae..db24213e2 100644 --- a/Robust.UnitTesting/Shared/Physics/BroadphaseNetworkingTest.cs +++ b/Robust.Shared.IntegrationTests/Physics/BroadphaseNetworkingTest.cs @@ -17,7 +17,7 @@ using Robust.Shared.Player; namespace Robust.UnitTesting.Shared.Physics; -public sealed class BroadphaseNetworkingTest : RobustIntegrationTest +internal sealed class BroadphaseNetworkingTest : RobustIntegrationTest { /// /// Check that the transform/broadphase is properly networked when a player moves to a newly spawned map/grid. diff --git a/Robust.UnitTesting/Shared/Physics/Broadphase_Test.cs b/Robust.Shared.IntegrationTests/Physics/Broadphase_Test.cs similarity index 99% rename from Robust.UnitTesting/Shared/Physics/Broadphase_Test.cs rename to Robust.Shared.IntegrationTests/Physics/Broadphase_Test.cs index d743882d3..cb87f2dba 100644 --- a/Robust.UnitTesting/Shared/Physics/Broadphase_Test.cs +++ b/Robust.Shared.IntegrationTests/Physics/Broadphase_Test.cs @@ -16,7 +16,7 @@ using Robust.UnitTesting.Server; namespace Robust.UnitTesting.Shared.Physics; [TestFixture] -public sealed class Broadphase_Test +internal sealed class Broadphase_Test { /// /// Tests that spawned static ents properly collide with entities in range. diff --git a/Robust.UnitTesting/Shared/Physics/CollisionPredictionTest.cs b/Robust.Shared.IntegrationTests/Physics/CollisionPredictionTest.cs similarity index 98% rename from Robust.UnitTesting/Shared/Physics/CollisionPredictionTest.cs rename to Robust.Shared.IntegrationTests/Physics/CollisionPredictionTest.cs index 4bd87bf6d..5c82d264b 100644 --- a/Robust.UnitTesting/Shared/Physics/CollisionPredictionTest.cs +++ b/Robust.Shared.IntegrationTests/Physics/CollisionPredictionTest.cs @@ -27,7 +27,7 @@ namespace Robust.UnitTesting.Shared.Physics; /// I.e., the assumption is that if a collision results in changes to data on a component, then that data will already /// have been sent to clients in the component's state, so we don't want to "double count" collisions. /// -public sealed class CollisionPredictionTest : RobustIntegrationTest +internal sealed class CollisionPredictionTest : RobustIntegrationTest { private static readonly string Prototypes = @" - type: entity @@ -405,7 +405,7 @@ public sealed class CollisionPredictionTest : RobustIntegrationTest } [RegisterComponent, NetworkedComponent] -public sealed partial class CollisionPredictionTestComponent : Component +internal sealed partial class CollisionPredictionTestComponent : Component { public bool IsTouching; public bool WasTouching; @@ -414,20 +414,20 @@ public sealed partial class CollisionPredictionTestComponent : Component public GameTick StopTick; [Serializable, NetSerializable] - public sealed class State(bool isTouching) : ComponentState + internal sealed class State(bool isTouching) : ComponentState { public bool IsTouching = isTouching; } } [Serializable, NetSerializable] -public sealed class CollisionTestMoveEvent(NetEntity ent, MapCoordinates coords) : EntityEventArgs +internal sealed class CollisionTestMoveEvent(NetEntity ent, MapCoordinates coords) : EntityEventArgs { public NetEntity Ent = ent; public MapCoordinates Coords = coords; } -public sealed class CollisionPredictionTestSystem : EntitySystem +internal sealed class CollisionPredictionTestSystem : EntitySystem { [Dependency] private readonly SharedTransformSystem _xform = default!; [Dependency] private readonly IGameTiming _timing = default!; diff --git a/Robust.UnitTesting/Shared/Physics/CollisionWake_Test.cs b/Robust.Shared.IntegrationTests/Physics/CollisionWake_Test.cs similarity index 98% rename from Robust.UnitTesting/Shared/Physics/CollisionWake_Test.cs rename to Robust.Shared.IntegrationTests/Physics/CollisionWake_Test.cs index 19dad0e3e..a4109827a 100644 --- a/Robust.UnitTesting/Shared/Physics/CollisionWake_Test.cs +++ b/Robust.Shared.IntegrationTests/Physics/CollisionWake_Test.cs @@ -10,7 +10,7 @@ using Robust.Shared.Physics.Components; namespace Robust.UnitTesting.Shared.Physics { [TestFixture, TestOf(typeof(CollisionWakeSystem))] - public sealed class CollisionWake_Test : RobustIntegrationTest + internal sealed class CollisionWake_Test : RobustIntegrationTest { private const string Prototype = @" - type: entity diff --git a/Robust.UnitTesting/Shared/Physics/Collision_Test.cs b/Robust.Shared.IntegrationTests/Physics/Collision_Test.cs similarity index 99% rename from Robust.UnitTesting/Shared/Physics/Collision_Test.cs rename to Robust.Shared.IntegrationTests/Physics/Collision_Test.cs index b74615757..ca615b24e 100644 --- a/Robust.UnitTesting/Shared/Physics/Collision_Test.cs +++ b/Robust.Shared.IntegrationTests/Physics/Collision_Test.cs @@ -36,7 +36,7 @@ using Robust.UnitTesting.Server; namespace Robust.UnitTesting.Shared.Physics; [TestFixture] -public sealed class Collision_Test +internal sealed class Collision_Test { [Test] public void TestHardCollidable() diff --git a/Robust.UnitTesting/Shared/Physics/FixtureShape_Test.cs b/Robust.Shared.IntegrationTests/Physics/FixtureShape_Test.cs similarity index 97% rename from Robust.UnitTesting/Shared/Physics/FixtureShape_Test.cs rename to Robust.Shared.IntegrationTests/Physics/FixtureShape_Test.cs index 841345486..2615babbb 100644 --- a/Robust.UnitTesting/Shared/Physics/FixtureShape_Test.cs +++ b/Robust.Shared.IntegrationTests/Physics/FixtureShape_Test.cs @@ -10,7 +10,7 @@ namespace Robust.UnitTesting.Shared.Physics { [TestFixture] [TestOf(typeof(FixtureSystem))] - public sealed class FixtureShape_Test : RobustUnitTest + internal sealed class FixtureShape_Test : OurRobustUnitTest { private FixtureSystem _shapeManager = default!; diff --git a/Robust.UnitTesting/Shared/Physics/Fixtures_Test.cs b/Robust.Shared.IntegrationTests/Physics/Fixtures_Test.cs similarity index 97% rename from Robust.UnitTesting/Shared/Physics/Fixtures_Test.cs rename to Robust.Shared.IntegrationTests/Physics/Fixtures_Test.cs index 81b8d0e65..f0d3be336 100644 --- a/Robust.UnitTesting/Shared/Physics/Fixtures_Test.cs +++ b/Robust.Shared.IntegrationTests/Physics/Fixtures_Test.cs @@ -12,7 +12,7 @@ using Robust.UnitTesting.Server; namespace Robust.UnitTesting.Shared.Physics; [TestFixture] -public sealed class Fixtures_Test +internal sealed class Fixtures_Test { [Test] public void SetDensity() diff --git a/Robust.UnitTesting/Shared/Physics/GridDeletion_Test.cs b/Robust.Shared.IntegrationTests/Physics/GridDeletion_Test.cs similarity index 97% rename from Robust.UnitTesting/Shared/Physics/GridDeletion_Test.cs rename to Robust.Shared.IntegrationTests/Physics/GridDeletion_Test.cs index a902184f3..20b35cdf7 100644 --- a/Robust.UnitTesting/Shared/Physics/GridDeletion_Test.cs +++ b/Robust.Shared.IntegrationTests/Physics/GridDeletion_Test.cs @@ -17,7 +17,7 @@ namespace Robust.UnitTesting.Shared.Physics; /// Mainly useful for grid dynamic tree. /// [TestFixture] -public sealed class GridDeletion_Test : RobustIntegrationTest +internal sealed class GridDeletion_Test : RobustIntegrationTest { [Test] public async Task GridDeletionTest() diff --git a/Robust.UnitTesting/Shared/Physics/GridMovement_Test.cs b/Robust.Shared.IntegrationTests/Physics/GridMovement_Test.cs similarity index 98% rename from Robust.UnitTesting/Shared/Physics/GridMovement_Test.cs rename to Robust.Shared.IntegrationTests/Physics/GridMovement_Test.cs index 0dddfa2fa..692fad565 100644 --- a/Robust.UnitTesting/Shared/Physics/GridMovement_Test.cs +++ b/Robust.Shared.IntegrationTests/Physics/GridMovement_Test.cs @@ -13,7 +13,7 @@ using Robust.Shared.Physics.Systems; namespace Robust.UnitTesting.Shared.Physics; [TestFixture, TestOf(typeof(SharedBroadphaseSystem))] -public sealed class GridMovement_Test : RobustIntegrationTest +internal sealed class GridMovement_Test : RobustIntegrationTest { [Test] public async Task TestFindGridContacts() diff --git a/Robust.UnitTesting/Shared/Physics/GridReparentVelocity_Test.cs b/Robust.Shared.IntegrationTests/Physics/GridReparentVelocity_Test.cs similarity index 99% rename from Robust.UnitTesting/Shared/Physics/GridReparentVelocity_Test.cs rename to Robust.Shared.IntegrationTests/Physics/GridReparentVelocity_Test.cs index 0e3af63a9..a8c2d11f2 100644 --- a/Robust.UnitTesting/Shared/Physics/GridReparentVelocity_Test.cs +++ b/Robust.Shared.IntegrationTests/Physics/GridReparentVelocity_Test.cs @@ -14,7 +14,7 @@ using Robust.UnitTesting.Server; namespace Robust.UnitTesting.Shared.Physics; [TestFixture, TestOf(typeof(SharedPhysicsSystem))] -public sealed class GridReparentVelocity_Test +internal sealed class GridReparentVelocity_Test { private ISimulation _sim = default!; private IEntitySystemManager _systems = default!; diff --git a/Robust.UnitTesting/Shared/Physics/JointDeletion_Test.cs b/Robust.Shared.IntegrationTests/Physics/JointDeletion_Test.cs similarity index 97% rename from Robust.UnitTesting/Shared/Physics/JointDeletion_Test.cs rename to Robust.Shared.IntegrationTests/Physics/JointDeletion_Test.cs index 91cfa16b6..e7ebeb642 100644 --- a/Robust.UnitTesting/Shared/Physics/JointDeletion_Test.cs +++ b/Robust.Shared.IntegrationTests/Physics/JointDeletion_Test.cs @@ -14,7 +14,7 @@ using Robust.Shared.Physics.Systems; namespace Robust.UnitTesting.Shared.Physics; [TestFixture] -public sealed class JointDeletion_Test : RobustIntegrationTest +internal sealed class JointDeletion_Test : RobustIntegrationTest { [Test] public async Task JointDeletionTest() diff --git a/Robust.UnitTesting/Shared/Physics/Joints_Test.cs b/Robust.Shared.IntegrationTests/Physics/Joints_Test.cs similarity index 99% rename from Robust.UnitTesting/Shared/Physics/Joints_Test.cs rename to Robust.Shared.IntegrationTests/Physics/Joints_Test.cs index 7d57cc244..887da6916 100644 --- a/Robust.UnitTesting/Shared/Physics/Joints_Test.cs +++ b/Robust.Shared.IntegrationTests/Physics/Joints_Test.cs @@ -15,7 +15,7 @@ using Robust.UnitTesting.Server; namespace Robust.UnitTesting.Shared.Physics; [TestFixture, TestOf(typeof(JointSystem))] -public sealed class Joints_Test +internal sealed class Joints_Test { [Test] public void JointsRelayTest() diff --git a/Robust.UnitTesting/Shared/Physics/ManifoldManager_Test.cs b/Robust.Shared.IntegrationTests/Physics/ManifoldManager_Test.cs similarity index 98% rename from Robust.UnitTesting/Shared/Physics/ManifoldManager_Test.cs rename to Robust.Shared.IntegrationTests/Physics/ManifoldManager_Test.cs index f0fc4d027..025fef85c 100644 --- a/Robust.UnitTesting/Shared/Physics/ManifoldManager_Test.cs +++ b/Robust.Shared.IntegrationTests/Physics/ManifoldManager_Test.cs @@ -11,7 +11,7 @@ namespace Robust.UnitTesting.Shared.Physics { [TestFixture] [TestOf(typeof(IManifoldManager))] - public sealed class ManifoldManager_Test : RobustUnitTest + internal sealed class ManifoldManager_Test : OurRobustUnitTest { private IManifoldManager _manifoldManager = default!; diff --git a/Robust.UnitTesting/Shared/Physics/MapVelocity_Test.cs b/Robust.Shared.IntegrationTests/Physics/MapVelocity_Test.cs similarity index 99% rename from Robust.UnitTesting/Shared/Physics/MapVelocity_Test.cs rename to Robust.Shared.IntegrationTests/Physics/MapVelocity_Test.cs index 36d3d5cdf..4067f53d1 100644 --- a/Robust.UnitTesting/Shared/Physics/MapVelocity_Test.cs +++ b/Robust.Shared.IntegrationTests/Physics/MapVelocity_Test.cs @@ -9,7 +9,7 @@ using Robust.Shared.Physics.Systems; namespace Robust.UnitTesting.Shared.Physics { - public sealed class MapVelocity_Test : RobustIntegrationTest + internal sealed class MapVelocity_Test : RobustIntegrationTest { private const string DummyEntity = "Dummy"; diff --git a/Robust.UnitTesting/Shared/Physics/PhysicsComponent_Test.cs b/Robust.Shared.IntegrationTests/Physics/PhysicsComponent_Test.cs similarity index 97% rename from Robust.UnitTesting/Shared/Physics/PhysicsComponent_Test.cs rename to Robust.Shared.IntegrationTests/Physics/PhysicsComponent_Test.cs index 59352bf2e..70d9b64cd 100644 --- a/Robust.UnitTesting/Shared/Physics/PhysicsComponent_Test.cs +++ b/Robust.Shared.IntegrationTests/Physics/PhysicsComponent_Test.cs @@ -16,7 +16,7 @@ namespace Robust.UnitTesting.Shared.Physics { [TestFixture] [TestOf(typeof(PhysicsComponent))] - public sealed class PhysicsComponent_Test : RobustIntegrationTest + internal sealed class PhysicsComponent_Test : RobustIntegrationTest { [Test] public async Task TestPointLinearImpulse() diff --git a/Robust.UnitTesting/Shared/Physics/PhysicsHull_Test.cs b/Robust.Shared.IntegrationTests/Physics/PhysicsHull_Test.cs similarity index 100% rename from Robust.UnitTesting/Shared/Physics/PhysicsHull_Test.cs rename to Robust.Shared.IntegrationTests/Physics/PhysicsHull_Test.cs diff --git a/Robust.UnitTesting/Shared/Physics/RayCast_Test.cs b/Robust.Shared.IntegrationTests/Physics/RayCast_Test.cs similarity index 99% rename from Robust.UnitTesting/Shared/Physics/RayCast_Test.cs rename to Robust.Shared.IntegrationTests/Physics/RayCast_Test.cs index caec0b8bc..1672d94c3 100644 --- a/Robust.UnitTesting/Shared/Physics/RayCast_Test.cs +++ b/Robust.Shared.IntegrationTests/Physics/RayCast_Test.cs @@ -15,7 +15,7 @@ using Robust.UnitTesting.Server; namespace Robust.UnitTesting.Shared.Physics; [TestFixture] -public sealed class RayCast_Test +internal sealed class RayCast_Test { private static TestCaseData[] _rayCases = { diff --git a/Robust.UnitTesting/Shared/Physics/RecursiveUpdateTest.cs b/Robust.Shared.IntegrationTests/Physics/RecursiveUpdateTest.cs similarity index 99% rename from Robust.UnitTesting/Shared/Physics/RecursiveUpdateTest.cs rename to Robust.Shared.IntegrationTests/Physics/RecursiveUpdateTest.cs index dd914a1ca..4b0613768 100644 --- a/Robust.UnitTesting/Shared/Physics/RecursiveUpdateTest.cs +++ b/Robust.Shared.IntegrationTests/Physics/RecursiveUpdateTest.cs @@ -11,7 +11,7 @@ using Robust.UnitTesting.Server; namespace Robust.UnitTesting.Shared.Physics; [TestFixture] -public sealed class RecursiveUpdateTest +internal sealed class RecursiveUpdateTest { /// /// Check that the broadphase updates if a an entity is a child of an entity that is in a container. diff --git a/Robust.UnitTesting/Shared/Physics/ShapeAABB_Test.cs b/Robust.Shared.IntegrationTests/Physics/ShapeAABB_Test.cs similarity index 98% rename from Robust.UnitTesting/Shared/Physics/ShapeAABB_Test.cs rename to Robust.Shared.IntegrationTests/Physics/ShapeAABB_Test.cs index b184b85a7..5b319b711 100644 --- a/Robust.UnitTesting/Shared/Physics/ShapeAABB_Test.cs +++ b/Robust.Shared.IntegrationTests/Physics/ShapeAABB_Test.cs @@ -9,7 +9,7 @@ using Robust.Shared.Physics.Collision.Shapes; namespace Robust.UnitTesting.Shared.Physics { [TestFixture] - public sealed class ShapeAABB_Test : RobustUnitTest + internal sealed class ShapeAABB_Test : OurRobustUnitTest { private Transform _transform; private Transform _rotatedTransform; diff --git a/Robust.UnitTesting/Shared/Physics/Shape_Test.cs b/Robust.Shared.IntegrationTests/Physics/Shape_Test.cs similarity index 94% rename from Robust.UnitTesting/Shared/Physics/Shape_Test.cs rename to Robust.Shared.IntegrationTests/Physics/Shape_Test.cs index 331d12fe2..fe0777787 100644 --- a/Robust.UnitTesting/Shared/Physics/Shape_Test.cs +++ b/Robust.Shared.IntegrationTests/Physics/Shape_Test.cs @@ -7,7 +7,7 @@ namespace Robust.UnitTesting.Shared.Physics { [TestFixture] [TestOf(typeof(IPhysShape))] - public sealed class Shape_Test : RobustUnitTest + internal sealed class Shape_Test : OurRobustUnitTest { [Test] public void TestPolyNormals() diff --git a/Robust.UnitTesting/Shared/Physics/Stack_Test.cs b/Robust.Shared.IntegrationTests/Physics/Stack_Test.cs similarity index 99% rename from Robust.UnitTesting/Shared/Physics/Stack_Test.cs rename to Robust.Shared.IntegrationTests/Physics/Stack_Test.cs index bf3f292e8..eb90f6634 100644 --- a/Robust.UnitTesting/Shared/Physics/Stack_Test.cs +++ b/Robust.Shared.IntegrationTests/Physics/Stack_Test.cs @@ -43,7 +43,7 @@ using Robust.Shared.Physics.Systems; namespace Robust.UnitTesting.Shared.Physics; [TestFixture] -public sealed class PhysicsTestBedTest : RobustIntegrationTest +internal sealed class PhysicsTestBedTest : RobustIntegrationTest { [Test] public async Task TestBoxStack() diff --git a/Robust.UnitTesting/Shared/Physics/TransformTest.cs b/Robust.Shared.IntegrationTests/Physics/TransformTest.cs similarity index 97% rename from Robust.UnitTesting/Shared/Physics/TransformTest.cs rename to Robust.Shared.IntegrationTests/Physics/TransformTest.cs index 83ffa0603..7b46954c1 100644 --- a/Robust.UnitTesting/Shared/Physics/TransformTest.cs +++ b/Robust.Shared.IntegrationTests/Physics/TransformTest.cs @@ -9,7 +9,7 @@ namespace Robust.UnitTesting.Shared.Physics; [TestFixture] [TestOf(typeof(Transform))] -public sealed class TransformTest +internal sealed class TransformTest { private static (Vector2 V, Transform T, Vector2 Exp)[] _vecMulData = [ diff --git a/Robust.UnitTesting/Shared/Physics/VerticesSimplifier_Test.cs b/Robust.Shared.IntegrationTests/Physics/VerticesSimplifier_Test.cs similarity index 97% rename from Robust.UnitTesting/Shared/Physics/VerticesSimplifier_Test.cs rename to Robust.Shared.IntegrationTests/Physics/VerticesSimplifier_Test.cs index 2b266c98f..d0ce7acd2 100644 --- a/Robust.UnitTesting/Shared/Physics/VerticesSimplifier_Test.cs +++ b/Robust.Shared.IntegrationTests/Physics/VerticesSimplifier_Test.cs @@ -8,7 +8,7 @@ namespace Robust.UnitTesting.Shared.Physics { [TestFixture, Parallelizable] [TestOf(typeof(IVerticesSimplifier))] - public sealed class VerticesSimplifier_Test : RobustUnitTest + internal sealed class VerticesSimplifier_Test : OurRobustUnitTest { /* * Collinear tests diff --git a/Robust.UnitTesting/Shared/Prototypes/HotReloadTest.cs b/Robust.Shared.IntegrationTests/Prototypes/HotReloadTest.cs similarity index 95% rename from Robust.UnitTesting/Shared/Prototypes/HotReloadTest.cs rename to Robust.Shared.IntegrationTests/Prototypes/HotReloadTest.cs index e0e90107c..22fa71473 100644 --- a/Robust.UnitTesting/Shared/Prototypes/HotReloadTest.cs +++ b/Robust.Shared.IntegrationTests/Prototypes/HotReloadTest.cs @@ -12,7 +12,7 @@ using Robust.Shared.Serialization.Manager.Attributes; namespace Robust.UnitTesting.Shared.Prototypes { [TestFixture] - public sealed class HotReloadTest : RobustUnitTest + internal sealed class HotReloadTest : OurRobustUnitTest { private const string DummyId = "Dummy"; public const string HotReloadTestComponentOneId = "HotReloadTestOne"; @@ -101,13 +101,13 @@ namespace Robust.UnitTesting.Shared.Prototypes } } - public sealed partial class HotReloadTestOneComponent : Component + internal sealed partial class HotReloadTestOneComponent : Component { [DataField("value")] public int Value { get; private set; } } - public sealed partial class HotReloadTestTwoComponent : Component + internal sealed partial class HotReloadTestTwoComponent : Component { } } diff --git a/Robust.UnitTesting/Shared/Prototypes/PrototypeManagerCategoriesTest.cs b/Robust.Shared.IntegrationTests/Prototypes/PrototypeManagerCategoriesTest.cs similarity index 97% rename from Robust.UnitTesting/Shared/Prototypes/PrototypeManagerCategoriesTest.cs rename to Robust.Shared.IntegrationTests/Prototypes/PrototypeManagerCategoriesTest.cs index 257373531..c4fd6c01c 100644 --- a/Robust.UnitTesting/Shared/Prototypes/PrototypeManagerCategoriesTest.cs +++ b/Robust.Shared.IntegrationTests/Prototypes/PrototypeManagerCategoriesTest.cs @@ -11,7 +11,7 @@ namespace Robust.UnitTesting.Shared.Prototypes; [UsedImplicitly] [TestFixture] -public sealed class PrototypeManagerCategoriesTest : RobustUnitTest +internal sealed class PrototypeManagerCategoriesTest : OurRobustUnitTest { private IPrototypeManager _protoMan = default!; @@ -265,8 +265,8 @@ public sealed class PrototypeManagerCategoriesTest : RobustUnitTest "; } -public sealed partial class AutoCategoryComponent : Component; +internal sealed partial class AutoCategoryComponent : Component; // TODO test-local IReflectionManager // [EntityCategory("Auto")] -// public sealed partial class AttributeAutoCategoryComponent : Component; +// internal sealed partial class AttributeAutoCategoryComponent : Component; diff --git a/Robust.UnitTesting/Shared/Prototypes/PrototypeManager_Test.cs b/Robust.Shared.IntegrationTests/Prototypes/PrototypeManager_Test.cs similarity index 98% rename from Robust.UnitTesting/Shared/Prototypes/PrototypeManager_Test.cs rename to Robust.Shared.IntegrationTests/Prototypes/PrototypeManager_Test.cs index 7d16de150..6b4d5777a 100644 --- a/Robust.UnitTesting/Shared/Prototypes/PrototypeManager_Test.cs +++ b/Robust.Shared.IntegrationTests/Prototypes/PrototypeManager_Test.cs @@ -15,7 +15,7 @@ namespace Robust.UnitTesting.Shared.Prototypes { [UsedImplicitly] [TestFixture] - public sealed class PrototypeManager_Test : RobustUnitTest + internal sealed class PrototypeManager_Test : OurRobustUnitTest { private const string FakeWrenchProtoId = "wrench"; private const string YamlTesterProtoId = "yamltester"; @@ -223,7 +223,7 @@ namespace Robust.UnitTesting.Shared.Prototypes name: {LoadStringTestDummyId}"; } - public sealed partial class TestBasicPrototypeComponent : Component + internal sealed partial class TestBasicPrototypeComponent : Component { [DataField("foo")] public string Foo = null!; diff --git a/Robust.UnitTesting/Shared/Reflection/ReflectionManager_Test.cs b/Robust.Shared.IntegrationTests/Reflection/ReflectionManager_Test.cs similarity index 90% rename from Robust.UnitTesting/Shared/Reflection/ReflectionManager_Test.cs rename to Robust.Shared.IntegrationTests/Reflection/ReflectionManager_Test.cs index 1dca766f3..47fd71c71 100644 --- a/Robust.UnitTesting/Shared/Reflection/ReflectionManager_Test.cs +++ b/Robust.Shared.IntegrationTests/Reflection/ReflectionManager_Test.cs @@ -6,13 +6,13 @@ using JetBrains.Annotations; namespace Robust.UnitTesting.Shared.Reflection { - public sealed class ReflectionManagerTest : ReflectionManager + internal sealed class ReflectionManagerTest : ReflectionManager { protected override IEnumerable TypePrefixes => new[] { "", "Robust.UnitTesting.", "Robust.Server.", "Robust.Shared." }; } [TestFixture] - public sealed class ReflectionManager_Test : RobustUnitTest + internal sealed class ReflectionManager_Test : OurRobustUnitTest { protected override void OverrideIoC() { @@ -59,12 +59,12 @@ namespace Robust.UnitTesting.Shared.Reflection public interface IReflectionManagerTest { } // These two pass like normal. - public sealed class TestClass1 : IReflectionManagerTest { } - public sealed class TestClass2 : IReflectionManagerTest { } + internal sealed class TestClass1 : IReflectionManagerTest { } + internal sealed class TestClass2 : IReflectionManagerTest { } // These two should both NOT be passed. [Reflect(false)] - public sealed class TestClass3 : IReflectionManagerTest { } + internal sealed class TestClass3 : IReflectionManagerTest { } public abstract class TestClass4 : IReflectionManagerTest { } [Test] @@ -97,14 +97,14 @@ namespace Robust.UnitTesting.Shared.Reflection } } - public sealed class TestGetType1 { } + internal sealed class TestGetType1 { } public abstract class TestGetType2 { } public interface ITestGetType3 { } public enum TestParseEnumReferenceType1 { Value } [UsedImplicitly] - public sealed class TestParseEnumReferenceTypeClass + internal sealed class TestParseEnumReferenceTypeClass { public enum TestParseEnumReferenceType2 { InnerValue } } diff --git a/Robust.UnitTesting/Shared/Resources/ContentFileReadTest.cs b/Robust.Shared.IntegrationTests/Resources/ContentFileReadTest.cs similarity index 97% rename from Robust.UnitTesting/Shared/Resources/ContentFileReadTest.cs rename to Robust.Shared.IntegrationTests/Resources/ContentFileReadTest.cs index 7685c4c3d..3842a06e1 100644 --- a/Robust.UnitTesting/Shared/Resources/ContentFileReadTest.cs +++ b/Robust.Shared.IntegrationTests/Resources/ContentFileReadTest.cs @@ -6,7 +6,7 @@ using Robust.Shared.Utility; namespace Robust.UnitTesting.Shared.Resources; -public sealed class ContentFileReadTest : RobustIntegrationTest +internal sealed class ContentFileReadTest : RobustIntegrationTest { [Test] [TestOf(typeof(ResourceManager))] diff --git a/Robust.Shared.IntegrationTests/Robust.Shared.IntegrationTests.csproj b/Robust.Shared.IntegrationTests/Robust.Shared.IntegrationTests.csproj new file mode 100644 index 000000000..598bf33c5 --- /dev/null +++ b/Robust.Shared.IntegrationTests/Robust.Shared.IntegrationTests.csproj @@ -0,0 +1,35 @@ + + + + + enable + false + ../bin/Shared.IntegrationTests + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Robust.UnitTesting/Shared/Serialization/CompositionTest.cs b/Robust.Shared.IntegrationTests/Serialization/CompositionTest.cs similarity index 95% rename from Robust.UnitTesting/Shared/Serialization/CompositionTest.cs rename to Robust.Shared.IntegrationTests/Serialization/CompositionTest.cs index 0e076dec9..a85cd94ea 100644 --- a/Robust.UnitTesting/Shared/Serialization/CompositionTest.cs +++ b/Robust.Shared.IntegrationTests/Serialization/CompositionTest.cs @@ -6,7 +6,7 @@ using Robust.Shared.Serialization.Markdown.Mapping; namespace Robust.UnitTesting.Shared.Serialization; [TestFixture] -public sealed partial class CompositionTest : SerializationTest +internal sealed partial class CompositionTest : OurSerializationTest { [DataDefinition] private sealed partial class CompositionTestClass diff --git a/Robust.UnitTesting/Shared/Serialization/DataRecordTest.cs b/Robust.Shared.IntegrationTests/Serialization/DataRecordTest.cs similarity index 99% rename from Robust.UnitTesting/Shared/Serialization/DataRecordTest.cs rename to Robust.Shared.IntegrationTests/Serialization/DataRecordTest.cs index f3f7c8c5e..1292c7d3d 100644 --- a/Robust.UnitTesting/Shared/Serialization/DataRecordTest.cs +++ b/Robust.Shared.IntegrationTests/Serialization/DataRecordTest.cs @@ -9,7 +9,7 @@ using Robust.Shared.Serialization.Markdown.Value; namespace Robust.UnitTesting.Shared.Serialization; -public sealed partial class DataRecordTest : SerializationTest +public sealed partial class DataRecordTest : OurSerializationTest { [DataRecord] public record TwoIntRecord(int aTest, int AnotherTest); diff --git a/Robust.UnitTesting/Shared/Serialization/DataStructTest.cs b/Robust.Shared.IntegrationTests/Serialization/DataStructTest.cs similarity index 89% rename from Robust.UnitTesting/Shared/Serialization/DataStructTest.cs rename to Robust.Shared.IntegrationTests/Serialization/DataStructTest.cs index 1eb60fff2..d9f62d1cc 100644 --- a/Robust.UnitTesting/Shared/Serialization/DataStructTest.cs +++ b/Robust.Shared.IntegrationTests/Serialization/DataStructTest.cs @@ -4,7 +4,7 @@ using Robust.Shared.Serialization.Markdown.Mapping; namespace Robust.UnitTesting.Shared.Serialization; -public sealed partial class DataStructTest : SerializationTest +internal sealed partial class DataStructTest : OurSerializationTest { [DataDefinition] public partial struct DefaultIntDataStruct diff --git a/Robust.UnitTesting/Shared/Serialization/IncludeTest.cs b/Robust.Shared.IntegrationTests/Serialization/IncludeTest.cs similarity index 96% rename from Robust.UnitTesting/Shared/Serialization/IncludeTest.cs rename to Robust.Shared.IntegrationTests/Serialization/IncludeTest.cs index e71d9c484..c0b99f93c 100644 --- a/Robust.UnitTesting/Shared/Serialization/IncludeTest.cs +++ b/Robust.Shared.IntegrationTests/Serialization/IncludeTest.cs @@ -8,7 +8,7 @@ using Robust.Shared.Serialization.Markdown.Value; namespace Robust.UnitTesting.Shared.Serialization; [TestFixture] -public sealed partial class IncludeTest : RobustUnitTest +internal sealed partial class IncludeTest : OurRobustUnitTest { [DataDefinition] private sealed partial class ReadWriteTestDataDefinition diff --git a/Robust.UnitTesting/Shared/Serialization/InheritanceSerializationTest.cs b/Robust.Shared.IntegrationTests/Serialization/InheritanceSerializationTest.cs similarity index 95% rename from Robust.UnitTesting/Shared/Serialization/InheritanceSerializationTest.cs rename to Robust.Shared.IntegrationTests/Serialization/InheritanceSerializationTest.cs index 6a24fbd6f..cbc725b36 100644 --- a/Robust.UnitTesting/Shared/Serialization/InheritanceSerializationTest.cs +++ b/Robust.Shared.IntegrationTests/Serialization/InheritanceSerializationTest.cs @@ -1,5 +1,6 @@ using System; using NUnit.Framework; +using Robust.Shared.Analyzers; using Robust.Shared.GameObjects; using Robust.Shared.IoC; using Robust.Shared.Map; @@ -12,7 +13,7 @@ namespace Robust.UnitTesting.Shared.Serialization { [TestFixture] [TestOf(typeof(DataDefinition))] - public sealed partial class InheritanceSerializationTest : RobustUnitTest + internal sealed partial class InheritanceSerializationTest : OurRobustUnitTest { private const string BaseEntityId = "BaseEntity"; private const string InheritorEntityId = "InheritorEntityId"; @@ -97,7 +98,7 @@ namespace Robust.UnitTesting.Shared.Serialization [DataField("inheritorField")] public string? InheritorField; } - public sealed partial class TestFinalComponent : TestInheritorComponent + internal sealed partial class TestFinalComponent : TestInheritorComponent { [DataField("finalField")] public string? FinalField; diff --git a/Robust.UnitTesting/Shared/Serialization/NetSerializableAttribute_Test.cs b/Robust.Shared.IntegrationTests/Serialization/NetSerializableAttribute_Test.cs similarity index 92% rename from Robust.UnitTesting/Shared/Serialization/NetSerializableAttribute_Test.cs rename to Robust.Shared.IntegrationTests/Serialization/NetSerializableAttribute_Test.cs index dcf12a38f..5b7608c85 100644 --- a/Robust.UnitTesting/Shared/Serialization/NetSerializableAttribute_Test.cs +++ b/Robust.Shared.IntegrationTests/Serialization/NetSerializableAttribute_Test.cs @@ -7,7 +7,7 @@ using Robust.Shared.Serialization; namespace Robust.UnitTesting.Shared.Serialization { [TestFixture] - sealed class NetSerializableAttribute_Test : RobustUnitTest + internal sealed class NetSerializableAttribute_Test : OurRobustUnitTest { private IReflectionManager _reflection = default!; diff --git a/Robust.UnitTesting/Shared/Serialization/NetSerializer_Test.cs b/Robust.Shared.IntegrationTests/Serialization/NetSerializer_Test.cs similarity index 99% rename from Robust.UnitTesting/Shared/Serialization/NetSerializer_Test.cs rename to Robust.Shared.IntegrationTests/Serialization/NetSerializer_Test.cs index 3f8dac33e..ed7954d58 100644 --- a/Robust.UnitTesting/Shared/Serialization/NetSerializer_Test.cs +++ b/Robust.Shared.IntegrationTests/Serialization/NetSerializer_Test.cs @@ -13,7 +13,7 @@ namespace Robust.UnitTesting.Shared.Serialization // Tests NetSerializer itself because we have specific modifications. // e.g. (at the time of writing) list serialization being more compact. [Parallelizable(ParallelScope.All)] - public sealed class NetSerializer_Test + internal sealed class NetSerializer_Test { public static readonly List?[] ListValues = { diff --git a/Robust.Shared.IntegrationTests/Serialization/OurSerializationTest.cs b/Robust.Shared.IntegrationTests/Serialization/OurSerializationTest.cs new file mode 100644 index 000000000..6dfa44913 --- /dev/null +++ b/Robust.Shared.IntegrationTests/Serialization/OurSerializationTest.cs @@ -0,0 +1,11 @@ +using System.Reflection; + +namespace Robust.UnitTesting.Shared.Serialization; + +public abstract class OurSerializationTest : SerializationTest +{ + protected override Assembly[] GetContentAssemblies() + { + return [typeof(OurSerializationTest).Assembly, ..base.GetContentAssemblies()]; + } +} diff --git a/Robust.UnitTesting/Shared/Serialization/PropertyAndFieldDefinitionTest.cs b/Robust.Shared.IntegrationTests/Serialization/PropertyAndFieldDefinitionTest.cs similarity index 97% rename from Robust.UnitTesting/Shared/Serialization/PropertyAndFieldDefinitionTest.cs rename to Robust.Shared.IntegrationTests/Serialization/PropertyAndFieldDefinitionTest.cs index 601251c8a..641358f25 100644 --- a/Robust.UnitTesting/Shared/Serialization/PropertyAndFieldDefinitionTest.cs +++ b/Robust.Shared.IntegrationTests/Serialization/PropertyAndFieldDefinitionTest.cs @@ -12,7 +12,7 @@ using Robust.Shared.Utility; namespace Robust.UnitTesting.Shared.Serialization { - public sealed partial class PropertyAndFieldDefinitionTest : SerializationTest + internal sealed partial class PropertyAndFieldDefinitionTest : OurSerializationTest { private const string GetOnlyPropertyName = "GetOnlyProperty"; private const string GetOnlyPropertyFieldTargetedName = "GetOnlyPropertyFieldTargeted"; @@ -110,7 +110,7 @@ namespace Robust.UnitTesting.Shared.Serialization } [Robust.Shared.Serialization.Manager.Attributes.DataDefinition] - public sealed partial class PropertyAndFieldDefinitionTestDefinition + internal sealed partial class PropertyAndFieldDefinitionTestDefinition { [DataField(GetOnlyPropertyName)] public int GetOnlyProperty { get; private set; } diff --git a/Robust.UnitTesting/Shared/Serialization/SerializationPriorityTest.cs b/Robust.Shared.IntegrationTests/Serialization/SerializationPriorityTest.cs similarity index 92% rename from Robust.UnitTesting/Shared/Serialization/SerializationPriorityTest.cs rename to Robust.Shared.IntegrationTests/Serialization/SerializationPriorityTest.cs index 80817aeb6..57b74aed0 100644 --- a/Robust.UnitTesting/Shared/Serialization/SerializationPriorityTest.cs +++ b/Robust.Shared.IntegrationTests/Serialization/SerializationPriorityTest.cs @@ -13,7 +13,7 @@ using YamlDotNet.RepresentationModel; namespace Robust.UnitTesting.Shared.Serialization { - public sealed class SerializationPriorityTest : RobustUnitTest + internal sealed class SerializationPriorityTest : OurRobustUnitTest { [Test] public void Test() @@ -41,7 +41,7 @@ namespace Robust.UnitTesting.Shared.Serialization } } - public sealed partial class PriorityTestComponent : Component, ISerializationHooks + internal sealed partial class PriorityTestComponent : Component, ISerializationHooks { public readonly List Strings = new() {string.Empty, string.Empty, string.Empty}; diff --git a/Robust.UnitTesting/Shared/Serialization/SerializationShutdownTest.cs b/Robust.Shared.IntegrationTests/Serialization/SerializationShutdownTest.cs similarity index 85% rename from Robust.UnitTesting/Shared/Serialization/SerializationShutdownTest.cs rename to Robust.Shared.IntegrationTests/Serialization/SerializationShutdownTest.cs index b43dce2aa..6504e626d 100644 --- a/Robust.UnitTesting/Shared/Serialization/SerializationShutdownTest.cs +++ b/Robust.Shared.IntegrationTests/Serialization/SerializationShutdownTest.cs @@ -4,7 +4,7 @@ namespace Robust.UnitTesting.Shared.Serialization { [TestFixture] [NonParallelizable] - public sealed class SerializationShutdownTest : SerializationTest + internal sealed class SerializationShutdownTest : OurSerializationTest { [Test] public void SerializationInitializeShutdownInitializeTest() diff --git a/Robust.UnitTesting/Shared/Serialization/SerializationTests/CommunitaryLungTest.cs b/Robust.Shared.IntegrationTests/Serialization/SerializationTests/CommunitaryLungTest.cs similarity index 97% rename from Robust.UnitTesting/Shared/Serialization/SerializationTests/CommunitaryLungTest.cs rename to Robust.Shared.IntegrationTests/Serialization/SerializationTests/CommunitaryLungTest.cs index dfd68cba5..1c1be2151 100644 --- a/Robust.UnitTesting/Shared/Serialization/SerializationTests/CommunitaryLungTest.cs +++ b/Robust.Shared.IntegrationTests/Serialization/SerializationTests/CommunitaryLungTest.cs @@ -5,7 +5,7 @@ using Robust.Shared.Serialization.Manager.Attributes; namespace Robust.UnitTesting.Shared.Serialization.SerializationTests; [TestFixture] -public sealed partial class CommunitaryLungTest : SerializationTest +internal sealed partial class CommunitaryLungTest : OurSerializationTest { [Test] public void Test() diff --git a/Robust.UnitTesting/Shared/Serialization/SerializationTests/DataDefinitionTests.Resources.cs b/Robust.Shared.IntegrationTests/Serialization/SerializationTests/DataDefinitionTests.Resources.cs similarity index 98% rename from Robust.UnitTesting/Shared/Serialization/SerializationTests/DataDefinitionTests.Resources.cs rename to Robust.Shared.IntegrationTests/Serialization/SerializationTests/DataDefinitionTests.Resources.cs index 6cd1911cd..bd8dc7d9d 100644 --- a/Robust.UnitTesting/Shared/Serialization/SerializationTests/DataDefinitionTests.Resources.cs +++ b/Robust.Shared.IntegrationTests/Serialization/SerializationTests/DataDefinitionTests.Resources.cs @@ -12,7 +12,7 @@ using Robust.Shared.Serialization.TypeSerializers.Interfaces; namespace Robust.UnitTesting.Shared.Serialization.SerializationTests; -public sealed partial class DataDefinitionTests +internal sealed partial class DataDefinitionTests { private const int SerializerReturnInt = 424; private static readonly DataDummyStruct SerializerReturnStruct = new (){ Value = "SerializerReturn" }; @@ -22,7 +22,7 @@ public sealed partial class DataDefinitionTests private static SequenceDataNode SerializerSequenceDataNode => new (SerializerValueDataNode); private static MappingDataNode SerializerMappingDataNode => new (){{"data", SerializerValueDataNode}}; - public sealed class DataDefinitionValueCustomTypeSerializer + internal sealed class DataDefinitionValueCustomTypeSerializer : ITypeSerializer, ITypeSerializer, ITypeSerializer, @@ -123,7 +123,7 @@ public sealed partial class DataDefinitionTests } } - public sealed class DataDefinitionSequenceCustomTypeSerializer + internal sealed class DataDefinitionSequenceCustomTypeSerializer : ITypeSerializer, ITypeSerializer, ITypeSerializer, @@ -227,7 +227,7 @@ public sealed partial class DataDefinitionTests } } - public sealed class DataDefinitionMappingCustomTypeSerializer + internal sealed class DataDefinitionMappingCustomTypeSerializer : ITypeSerializer, ITypeSerializer, ITypeSerializer, @@ -361,7 +361,7 @@ public sealed partial class DataDefinitionTests } [CopyByRef] - public sealed class DataDummyClass : ISelfSerialize, IEquatable + internal sealed class DataDummyClass : ISelfSerialize, IEquatable { public string Value = string.Empty; public void Deserialize(string value) diff --git a/Robust.UnitTesting/Shared/Serialization/SerializationTests/DataDefinitionTests.cs b/Robust.Shared.IntegrationTests/Serialization/SerializationTests/DataDefinitionTests.cs similarity index 99% rename from Robust.UnitTesting/Shared/Serialization/SerializationTests/DataDefinitionTests.cs rename to Robust.Shared.IntegrationTests/Serialization/SerializationTests/DataDefinitionTests.cs index f2840126d..7397ba02c 100644 --- a/Robust.UnitTesting/Shared/Serialization/SerializationTests/DataDefinitionTests.cs +++ b/Robust.Shared.IntegrationTests/Serialization/SerializationTests/DataDefinitionTests.cs @@ -11,7 +11,7 @@ using Robust.Shared.Serialization.Markdown.Value; namespace Robust.UnitTesting.Shared.Serialization.SerializationTests; -public sealed partial class DataDefinitionTests : SerializationTest +internal sealed partial class DataDefinitionTests : OurSerializationTest { //todo test that no references are wrongfully copied @@ -23,7 +23,7 @@ public sealed partial class DataDefinitionTests : SerializationTest //copy: null <> cts(cc(+nt), c)/regular(c) [DataDefinition] - public sealed partial class DataDefTestDummy + internal sealed partial class DataDefTestDummy { [DataField("a")] public int a = Int32.MaxValue; [DataField("b")] public DataDummyStruct b = new(){Value = "default"}; diff --git a/Robust.UnitTesting/Shared/Serialization/SerializationTests/ManagerTests.Resources.cs b/Robust.Shared.IntegrationTests/Serialization/SerializationTests/ManagerTests.Resources.cs similarity index 99% rename from Robust.UnitTesting/Shared/Serialization/SerializationTests/ManagerTests.Resources.cs rename to Robust.Shared.IntegrationTests/Serialization/SerializationTests/ManagerTests.Resources.cs index a997865ad..17ba62734 100644 --- a/Robust.UnitTesting/Shared/Serialization/SerializationTests/ManagerTests.Resources.cs +++ b/Robust.Shared.IntegrationTests/Serialization/SerializationTests/ManagerTests.Resources.cs @@ -15,7 +15,7 @@ namespace Robust.UnitTesting.Shared.Serialization.SerializationTests; /// /// Class holding all the resources needed for . I opted to move them all in here because i wanted the TestFixture to not look so messy /// -public sealed partial class ManagerTests : ISerializationContext +internal sealed partial class ManagerTests : ISerializationContext { private static ValueDataNode SerializerRanDataNode => new ("SerializerRan"); private static ValueDataNode SerializerRanCustomDataNode => new ("SerializerRanCustom"); diff --git a/Robust.UnitTesting/Shared/Serialization/SerializationTests/ManagerTests.cs b/Robust.Shared.IntegrationTests/Serialization/SerializationTests/ManagerTests.cs similarity index 99% rename from Robust.UnitTesting/Shared/Serialization/SerializationTests/ManagerTests.cs rename to Robust.Shared.IntegrationTests/Serialization/SerializationTests/ManagerTests.cs index a538b6a73..93701b236 100644 --- a/Robust.UnitTesting/Shared/Serialization/SerializationTests/ManagerTests.cs +++ b/Robust.Shared.IntegrationTests/Serialization/SerializationTests/ManagerTests.cs @@ -12,7 +12,7 @@ using Robust.Shared.Serialization.Markdown.Value; namespace Robust.UnitTesting.Shared.Serialization.SerializationTests; [TestFixture] -public sealed partial class ManagerTests : SerializationTest +internal sealed partial class ManagerTests : OurSerializationTest { /* legend: NT => Nullable Type diff --git a/Robust.UnitTesting/Shared/Serialization/SerializationTests/ReadValueProviderTests.cs b/Robust.Shared.IntegrationTests/Serialization/SerializationTests/ReadValueProviderTests.cs similarity index 93% rename from Robust.UnitTesting/Shared/Serialization/SerializationTests/ReadValueProviderTests.cs rename to Robust.Shared.IntegrationTests/Serialization/SerializationTests/ReadValueProviderTests.cs index 7279aed0c..eb7da26f9 100644 --- a/Robust.UnitTesting/Shared/Serialization/SerializationTests/ReadValueProviderTests.cs +++ b/Robust.Shared.IntegrationTests/Serialization/SerializationTests/ReadValueProviderTests.cs @@ -9,7 +9,7 @@ using Robust.Shared.Serialization.Markdown.Value; namespace Robust.UnitTesting.Shared.Serialization.SerializationTests; -public sealed partial class ReadValueProviderTests : SerializationTest +internal sealed partial class ReadValueProviderTests : OurSerializationTest { //test for: datadefinition (value, mapping), selfserialize @@ -31,12 +31,12 @@ public sealed partial class ReadValueProviderTests : SerializationTest } [DataDefinition] - public sealed partial class DataDefinitionValueProviderTestDummy : IBaseInterface + internal sealed partial class DataDefinitionValueProviderTestDummy : IBaseInterface { [DataField("data")] public string Data = string.Empty; } - public sealed class OtherDataDefinitionValueProviderTestDummy : IBaseInterface{} + internal sealed class OtherDataDefinitionValueProviderTestDummy : IBaseInterface{} private interface IBaseInterface {} diff --git a/Robust.UnitTesting/Shared/Serialization/TypeSerializers/AngleSerializerTest.cs b/Robust.Shared.IntegrationTests/Serialization/TypeSerializers/AngleSerializerTest.cs similarity index 96% rename from Robust.UnitTesting/Shared/Serialization/TypeSerializers/AngleSerializerTest.cs rename to Robust.Shared.IntegrationTests/Serialization/TypeSerializers/AngleSerializerTest.cs index 8d91188f0..67795ba89 100644 --- a/Robust.UnitTesting/Shared/Serialization/TypeSerializers/AngleSerializerTest.cs +++ b/Robust.Shared.IntegrationTests/Serialization/TypeSerializers/AngleSerializerTest.cs @@ -10,7 +10,7 @@ namespace Robust.UnitTesting.Shared.Serialization.TypeSerializers { [TestFixture] [TestOf(typeof(AngleSerializer))] - public sealed class AngleSerializerTest : SerializationTest + internal sealed class AngleSerializerTest : OurSerializationTest { private static readonly TestCaseData[] _source = new[] { diff --git a/Robust.UnitTesting/Shared/Serialization/TypeSerializers/ArraySerializerTest.cs b/Robust.Shared.IntegrationTests/Serialization/TypeSerializers/ArraySerializerTest.cs similarity index 93% rename from Robust.UnitTesting/Shared/Serialization/TypeSerializers/ArraySerializerTest.cs rename to Robust.Shared.IntegrationTests/Serialization/TypeSerializers/ArraySerializerTest.cs index 327c72783..8242c53dd 100644 --- a/Robust.UnitTesting/Shared/Serialization/TypeSerializers/ArraySerializerTest.cs +++ b/Robust.Shared.IntegrationTests/Serialization/TypeSerializers/ArraySerializerTest.cs @@ -8,7 +8,7 @@ namespace Robust.UnitTesting.Shared.Serialization.TypeSerializers { [TestFixture] [TestOf(typeof(ListSerializers<>))] - public sealed class ArraySerializerTest : SerializationTest + internal sealed class ArraySerializerTest : OurSerializationTest { [Test] public void SerializationTest() diff --git a/Robust.UnitTesting/Shared/Serialization/TypeSerializers/Box2SerializerTest.cs b/Robust.Shared.IntegrationTests/Serialization/TypeSerializers/Box2SerializerTest.cs similarity index 96% rename from Robust.UnitTesting/Shared/Serialization/TypeSerializers/Box2SerializerTest.cs rename to Robust.Shared.IntegrationTests/Serialization/TypeSerializers/Box2SerializerTest.cs index 9b44d8db0..a2a1bdffb 100644 --- a/Robust.UnitTesting/Shared/Serialization/TypeSerializers/Box2SerializerTest.cs +++ b/Robust.Shared.IntegrationTests/Serialization/TypeSerializers/Box2SerializerTest.cs @@ -8,7 +8,7 @@ namespace Robust.UnitTesting.Shared.Serialization.TypeSerializers { [TestFixture] [TestOf(typeof(Box2Serializer))] - public sealed class Box2SerializerTest : SerializationTest + internal sealed class Box2SerializerTest : OurSerializationTest { [Test] public void SerializationTest() diff --git a/Robust.UnitTesting/Shared/Serialization/TypeSerializers/ColorSerializerTest.cs b/Robust.Shared.IntegrationTests/Serialization/TypeSerializers/ColorSerializerTest.cs similarity index 97% rename from Robust.UnitTesting/Shared/Serialization/TypeSerializers/ColorSerializerTest.cs rename to Robust.Shared.IntegrationTests/Serialization/TypeSerializers/ColorSerializerTest.cs index 798757bc2..3a40d25a5 100644 --- a/Robust.UnitTesting/Shared/Serialization/TypeSerializers/ColorSerializerTest.cs +++ b/Robust.Shared.IntegrationTests/Serialization/TypeSerializers/ColorSerializerTest.cs @@ -8,7 +8,7 @@ namespace Robust.UnitTesting.Shared.Serialization.TypeSerializers { [TestFixture] [TestOf(typeof(ColorSerializer))] - public sealed class ColorSerializerTest : SerializationTest + internal sealed class ColorSerializerTest : OurSerializationTest { [Test] public void SerializationTest() diff --git a/Robust.UnitTesting/Shared/Serialization/TypeSerializers/ComponentRegistrySerializerTest.cs b/Robust.Shared.IntegrationTests/Serialization/TypeSerializers/ComponentRegistrySerializerTest.cs similarity index 93% rename from Robust.UnitTesting/Shared/Serialization/TypeSerializers/ComponentRegistrySerializerTest.cs rename to Robust.Shared.IntegrationTests/Serialization/TypeSerializers/ComponentRegistrySerializerTest.cs index 91ba30337..8c3eed5ac 100644 --- a/Robust.UnitTesting/Shared/Serialization/TypeSerializers/ComponentRegistrySerializerTest.cs +++ b/Robust.Shared.IntegrationTests/Serialization/TypeSerializers/ComponentRegistrySerializerTest.cs @@ -17,7 +17,7 @@ namespace Robust.UnitTesting.Shared.Serialization.TypeSerializers { [TestFixture] [TestOf(typeof(ComponentRegistrySerializer))] - public sealed class ComponentRegistrySerializerTest : SerializationTest + internal sealed class ComponentRegistrySerializerTest : OurSerializationTest { protected override Type[]? ExtraComponents => new[] {typeof(TestComponent)}; @@ -52,7 +52,7 @@ namespace Robust.UnitTesting.Shared.Serialization.TypeSerializers } } - public sealed partial class TestComponent : Component + internal sealed partial class TestComponent : Component { } } diff --git a/Robust.UnitTesting/Shared/Serialization/TypeSerializers/Custom/AbstractDictionarySerializerTest.cs b/Robust.Shared.IntegrationTests/Serialization/TypeSerializers/Custom/AbstractDictionarySerializerTest.cs similarity index 95% rename from Robust.UnitTesting/Shared/Serialization/TypeSerializers/Custom/AbstractDictionarySerializerTest.cs rename to Robust.Shared.IntegrationTests/Serialization/TypeSerializers/Custom/AbstractDictionarySerializerTest.cs index f09235695..8dcbe29cc 100644 --- a/Robust.UnitTesting/Shared/Serialization/TypeSerializers/Custom/AbstractDictionarySerializerTest.cs +++ b/Robust.Shared.IntegrationTests/Serialization/TypeSerializers/Custom/AbstractDictionarySerializerTest.cs @@ -15,7 +15,7 @@ namespace Robust.UnitTesting.Shared.Serialization.TypeSerializers.Custom; [TestFixture] [TestOf(typeof(AbstractDictionarySerializer<>))] -public sealed partial class AbstractDictionarySerializerTest : RobustUnitTest +internal sealed partial class AbstractDictionarySerializerTest : OurRobustUnitTest { private const string TestYaml = @" SealedTestTypeA: @@ -40,7 +40,7 @@ SealedTestTypeB: MappingDataNode, AbstractDictionarySerializer> (node); - Assert.That(validation.GetErrors().Count(), Is.EqualTo(0)); + Assert.That(validation.GetErrors(), Is.Empty); var data = seri.Read, MappingDataNode, diff --git a/Robust.UnitTesting/Shared/Serialization/TypeSerializers/Custom/FlagSerializerTest.cs b/Robust.Shared.IntegrationTests/Serialization/TypeSerializers/Custom/FlagSerializerTest.cs similarity index 97% rename from Robust.UnitTesting/Shared/Serialization/TypeSerializers/Custom/FlagSerializerTest.cs rename to Robust.Shared.IntegrationTests/Serialization/TypeSerializers/Custom/FlagSerializerTest.cs index 30ac3bbb3..8d6431c74 100644 --- a/Robust.UnitTesting/Shared/Serialization/TypeSerializers/Custom/FlagSerializerTest.cs +++ b/Robust.Shared.IntegrationTests/Serialization/TypeSerializers/Custom/FlagSerializerTest.cs @@ -12,7 +12,7 @@ namespace Robust.UnitTesting.Shared.Serialization.TypeSerializers.Custom { [TestFixture] [TestOf(typeof(FlagSerializer<>))] - public sealed partial class FlagSerializerTest : SerializationTest + internal sealed partial class FlagSerializerTest : OurSerializationTest { [Test] public void SingleFlagTest() diff --git a/Robust.UnitTesting/Shared/Serialization/TypeSerializers/Custom/Prototype/PrototypeIdListSerializerTest.cs b/Robust.Shared.IntegrationTests/Serialization/TypeSerializers/Custom/Prototype/PrototypeIdListSerializerTest.cs similarity index 97% rename from Robust.UnitTesting/Shared/Serialization/TypeSerializers/Custom/Prototype/PrototypeIdListSerializerTest.cs rename to Robust.Shared.IntegrationTests/Serialization/TypeSerializers/Custom/Prototype/PrototypeIdListSerializerTest.cs index 027a874b6..b25e294a3 100644 --- a/Robust.UnitTesting/Shared/Serialization/TypeSerializers/Custom/Prototype/PrototypeIdListSerializerTest.cs +++ b/Robust.Shared.IntegrationTests/Serialization/TypeSerializers/Custom/Prototype/PrototypeIdListSerializerTest.cs @@ -18,7 +18,7 @@ namespace Robust.UnitTesting.Shared.Serialization.TypeSerializers.Custom.Prototy { [TestFixture] [TestOf(typeof(PrototypeIdListSerializer<>))] - public sealed class PrototypeIdListSerializerTest : SerializationTest + internal sealed class PrototypeIdListSerializerTest : OurSerializationTest { private static readonly string TestEntityId = $"{nameof(PrototypeIdListSerializerTest)}Dummy"; @@ -141,7 +141,7 @@ entitiesImmutableList: } [DataDefinition] - public sealed partial class PrototypeIdListSerializerTestDataDefinition + internal sealed partial class PrototypeIdListSerializerTestDataDefinition { [DataField("entitiesList", customTypeSerializer: typeof(PrototypeIdListSerializer))] public List EntitiesList = new(); diff --git a/Robust.UnitTesting/Shared/Serialization/TypeSerializers/DateTimeSerializerTest.cs b/Robust.Shared.IntegrationTests/Serialization/TypeSerializers/DateTimeSerializerTest.cs similarity index 92% rename from Robust.UnitTesting/Shared/Serialization/TypeSerializers/DateTimeSerializerTest.cs rename to Robust.Shared.IntegrationTests/Serialization/TypeSerializers/DateTimeSerializerTest.cs index 39853217f..c4fd951b6 100644 --- a/Robust.UnitTesting/Shared/Serialization/TypeSerializers/DateTimeSerializerTest.cs +++ b/Robust.Shared.IntegrationTests/Serialization/TypeSerializers/DateTimeSerializerTest.cs @@ -9,7 +9,7 @@ namespace Robust.UnitTesting.Shared.Serialization.TypeSerializers; [TestFixture] [TestOf(typeof(DateTimeSerializer))] -internal sealed class DateTimeSerializerTest : SerializationTest +internal sealed class DateTimeSerializerTest : OurSerializationTest { [Test] public void WriteTest() diff --git a/Robust.UnitTesting/Shared/Serialization/TypeSerializers/DictionarySerializerTest.cs b/Robust.Shared.IntegrationTests/Serialization/TypeSerializers/DictionarySerializerTest.cs similarity index 95% rename from Robust.UnitTesting/Shared/Serialization/TypeSerializers/DictionarySerializerTest.cs rename to Robust.Shared.IntegrationTests/Serialization/TypeSerializers/DictionarySerializerTest.cs index d7a33d703..8ac3097b7 100644 --- a/Robust.UnitTesting/Shared/Serialization/TypeSerializers/DictionarySerializerTest.cs +++ b/Robust.Shared.IntegrationTests/Serialization/TypeSerializers/DictionarySerializerTest.cs @@ -9,7 +9,7 @@ namespace Robust.UnitTesting.Shared.Serialization.TypeSerializers { [TestFixture] [TestOf(typeof(DictionarySerializer<,>))] - public sealed class DictionarySerializerTest : SerializationTest + internal sealed class DictionarySerializerTest : OurSerializationTest { [Test] public void SerializationTest() diff --git a/Robust.UnitTesting/Shared/Serialization/TypeSerializers/FormattedMessageSerializerTest.cs b/Robust.Shared.IntegrationTests/Serialization/TypeSerializers/FormattedMessageSerializerTest.cs similarity index 93% rename from Robust.UnitTesting/Shared/Serialization/TypeSerializers/FormattedMessageSerializerTest.cs rename to Robust.Shared.IntegrationTests/Serialization/TypeSerializers/FormattedMessageSerializerTest.cs index 9ce2f7971..8ebee5ad7 100644 --- a/Robust.UnitTesting/Shared/Serialization/TypeSerializers/FormattedMessageSerializerTest.cs +++ b/Robust.Shared.IntegrationTests/Serialization/TypeSerializers/FormattedMessageSerializerTest.cs @@ -8,7 +8,7 @@ namespace Robust.UnitTesting.Shared.Serialization.TypeSerializers; [TestFixture] [TestOf(typeof(FormattedMessageSerializer))] -public sealed class FormattedMessageSerializerTest : SerializationTest +internal sealed class FormattedMessageSerializerTest : OurSerializationTest { [Test] [TestCase("message")] diff --git a/Robust.UnitTesting/Shared/Serialization/TypeSerializers/HashSetSerializerTest.cs b/Robust.Shared.IntegrationTests/Serialization/TypeSerializers/HashSetSerializerTest.cs similarity index 94% rename from Robust.UnitTesting/Shared/Serialization/TypeSerializers/HashSetSerializerTest.cs rename to Robust.Shared.IntegrationTests/Serialization/TypeSerializers/HashSetSerializerTest.cs index d53563c0a..cb0ae7f14 100644 --- a/Robust.UnitTesting/Shared/Serialization/TypeSerializers/HashSetSerializerTest.cs +++ b/Robust.Shared.IntegrationTests/Serialization/TypeSerializers/HashSetSerializerTest.cs @@ -9,7 +9,7 @@ namespace Robust.UnitTesting.Shared.Serialization.TypeSerializers { [TestFixture] [TestOf(typeof(HashSetSerializer<>))] - public sealed class HashSetSerializerTest : SerializationTest + internal sealed class HashSetSerializerTest : OurSerializationTest { [Test] public void SerializationTest() diff --git a/Robust.UnitTesting/Shared/Serialization/TypeSerializers/IntegerSerializerTest.cs b/Robust.Shared.IntegrationTests/Serialization/TypeSerializers/IntegerSerializerTest.cs similarity index 90% rename from Robust.UnitTesting/Shared/Serialization/TypeSerializers/IntegerSerializerTest.cs rename to Robust.Shared.IntegrationTests/Serialization/TypeSerializers/IntegerSerializerTest.cs index cf2b4fa05..747b3a424 100644 --- a/Robust.UnitTesting/Shared/Serialization/TypeSerializers/IntegerSerializerTest.cs +++ b/Robust.Shared.IntegrationTests/Serialization/TypeSerializers/IntegerSerializerTest.cs @@ -4,7 +4,7 @@ using Robust.Shared.Serialization.Markdown.Value; namespace Robust.UnitTesting.Shared.Serialization.TypeSerializers { [TestFixture] - public sealed class IntegerSerializerTest : SerializationTest + internal sealed class IntegerSerializerTest : OurSerializationTest { [Test] public void IntReadTest() diff --git a/Robust.UnitTesting/Shared/Serialization/TypeSerializers/ListSerializerTest.cs b/Robust.Shared.IntegrationTests/Serialization/TypeSerializers/ListSerializerTest.cs similarity index 97% rename from Robust.UnitTesting/Shared/Serialization/TypeSerializers/ListSerializerTest.cs rename to Robust.Shared.IntegrationTests/Serialization/TypeSerializers/ListSerializerTest.cs index f792dc3a2..bd3a00194 100644 --- a/Robust.UnitTesting/Shared/Serialization/TypeSerializers/ListSerializerTest.cs +++ b/Robust.Shared.IntegrationTests/Serialization/TypeSerializers/ListSerializerTest.cs @@ -9,7 +9,7 @@ namespace Robust.UnitTesting.Shared.Serialization.TypeSerializers { [TestFixture] [TestOf(typeof(ListSerializers<>))] - public sealed class ListSerializerTest : SerializationTest + internal sealed class ListSerializerTest : OurSerializationTest { [Test] public void SerializationTest() diff --git a/Robust.UnitTesting/Shared/Serialization/TypeSerializers/RegexSerializerTest.cs b/Robust.Shared.IntegrationTests/Serialization/TypeSerializers/RegexSerializerTest.cs similarity index 94% rename from Robust.UnitTesting/Shared/Serialization/TypeSerializers/RegexSerializerTest.cs rename to Robust.Shared.IntegrationTests/Serialization/TypeSerializers/RegexSerializerTest.cs index 5132e52df..180b12b13 100644 --- a/Robust.UnitTesting/Shared/Serialization/TypeSerializers/RegexSerializerTest.cs +++ b/Robust.Shared.IntegrationTests/Serialization/TypeSerializers/RegexSerializerTest.cs @@ -8,7 +8,7 @@ namespace Robust.UnitTesting.Shared.Serialization.TypeSerializers { [TestFixture] [TestOf(typeof(RegexSerializer))] - public sealed class RegexSerializerTest : SerializationTest + internal sealed class RegexSerializerTest : OurSerializationTest { [Test] public void SerializationTest() diff --git a/Robust.UnitTesting/Shared/Serialization/TypeSerializers/SortedSetSerializerTest.cs b/Robust.Shared.IntegrationTests/Serialization/TypeSerializers/SortedSetSerializerTest.cs similarity index 94% rename from Robust.UnitTesting/Shared/Serialization/TypeSerializers/SortedSetSerializerTest.cs rename to Robust.Shared.IntegrationTests/Serialization/TypeSerializers/SortedSetSerializerTest.cs index 968eae3bf..246f9f143 100644 --- a/Robust.UnitTesting/Shared/Serialization/TypeSerializers/SortedSetSerializerTest.cs +++ b/Robust.Shared.IntegrationTests/Serialization/TypeSerializers/SortedSetSerializerTest.cs @@ -9,7 +9,7 @@ namespace Robust.UnitTesting.Shared.Serialization.TypeSerializers; [TestFixture] [TestOf(typeof(SortedSetSerializer<>))] -public sealed class SortedSetSerializerTest : SerializationTest +internal sealed class SortedSetSerializerTest : OurSerializationTest { [Test] public void SerializationTest() diff --git a/Robust.UnitTesting/Shared/Serialization/TypeSerializers/TimespanSerializerTest.cs b/Robust.Shared.IntegrationTests/Serialization/TypeSerializers/TimespanSerializerTest.cs similarity index 95% rename from Robust.UnitTesting/Shared/Serialization/TypeSerializers/TimespanSerializerTest.cs rename to Robust.Shared.IntegrationTests/Serialization/TypeSerializers/TimespanSerializerTest.cs index c3f145e95..a32ab668b 100644 --- a/Robust.UnitTesting/Shared/Serialization/TypeSerializers/TimespanSerializerTest.cs +++ b/Robust.Shared.IntegrationTests/Serialization/TypeSerializers/TimespanSerializerTest.cs @@ -8,7 +8,7 @@ namespace Robust.UnitTesting.Shared.Serialization.TypeSerializers; [TestFixture] [TestOf(typeof(TimespanSerializer))] -internal sealed class TimespanSerializerTest : SerializationTest +internal sealed class TimespanSerializerTest : OurSerializationTest { [Test] public void ReadTest() diff --git a/Robust.UnitTesting/Shared/Serialization/VirtualObjectArrayTest.cs b/Robust.Shared.IntegrationTests/Serialization/VirtualObjectArrayTest.cs similarity index 98% rename from Robust.UnitTesting/Shared/Serialization/VirtualObjectArrayTest.cs rename to Robust.Shared.IntegrationTests/Serialization/VirtualObjectArrayTest.cs index c2dc599e9..4eb75d9a1 100644 --- a/Robust.UnitTesting/Shared/Serialization/VirtualObjectArrayTest.cs +++ b/Robust.Shared.IntegrationTests/Serialization/VirtualObjectArrayTest.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using NUnit.Framework; +using Robust.Shared.Analyzers; using Robust.Shared.Serialization.Manager.Attributes; using Robust.Shared.Serialization.Markdown.Mapping; using Robust.Shared.Serialization.Markdown.Sequence; @@ -9,7 +10,7 @@ namespace Robust.UnitTesting.Shared.Serialization; /// /// Tests that arrays and lists of virtual/abstract objects can be properly serialized and deserialized. /// -public sealed partial class VirtualObjectArrayTest : SerializationTest +internal sealed partial class VirtualObjectArrayTest : OurSerializationTest { [ImplicitDataDefinitionForInheritors] private abstract partial class BaseTestDataDef { } diff --git a/Robust.UnitTesting/Shared/Serialization/YamlObjectSerializerTests/ImmutableListSerializationTest.cs b/Robust.Shared.IntegrationTests/Serialization/YamlObjectSerializerTests/ImmutableListSerializationTest.cs similarity index 97% rename from Robust.UnitTesting/Shared/Serialization/YamlObjectSerializerTests/ImmutableListSerializationTest.cs rename to Robust.Shared.IntegrationTests/Serialization/YamlObjectSerializerTests/ImmutableListSerializationTest.cs index b908a8aef..cf34621d0 100644 --- a/Robust.UnitTesting/Shared/Serialization/YamlObjectSerializerTests/ImmutableListSerializationTest.cs +++ b/Robust.Shared.IntegrationTests/Serialization/YamlObjectSerializerTests/ImmutableListSerializationTest.cs @@ -13,7 +13,7 @@ using YamlDotNet.RepresentationModel; namespace Robust.UnitTesting.Shared.Serialization.YamlObjectSerializerTests { [TestFixture] - public sealed class ImmutableListSerializationTest : RobustUnitTest + internal sealed class ImmutableListSerializationTest : OurRobustUnitTest { [OneTimeSetUp] public void Setup() diff --git a/Robust.UnitTesting/Shared/Serialization/YamlObjectSerializerTests/TypePropertySerialization_Test.cs b/Robust.Shared.IntegrationTests/Serialization/YamlObjectSerializerTests/TypePropertySerialization_Test.cs similarity index 95% rename from Robust.UnitTesting/Shared/Serialization/YamlObjectSerializerTests/TypePropertySerialization_Test.cs rename to Robust.Shared.IntegrationTests/Serialization/YamlObjectSerializerTests/TypePropertySerialization_Test.cs index 5b7b95732..ea1565aaa 100644 --- a/Robust.UnitTesting/Shared/Serialization/YamlObjectSerializerTests/TypePropertySerialization_Test.cs +++ b/Robust.Shared.IntegrationTests/Serialization/YamlObjectSerializerTests/TypePropertySerialization_Test.cs @@ -13,7 +13,7 @@ using YamlDotNet.RepresentationModel; namespace Robust.UnitTesting.Shared.Serialization.YamlObjectSerializerTests { [TestFixture] - public sealed class TypePropertySerialization_Test : RobustUnitTest + internal sealed class TypePropertySerialization_Test : OurRobustUnitTest { [OneTimeSetUp] public void Setup() @@ -91,7 +91,7 @@ namespace Robust.UnitTesting.Shared.Serialization.YamlObjectSerializerTests } [RegisterComponent] - public sealed partial class TestComponent : Component + internal sealed partial class TestComponent : Component { [DataField("testType")] public ITestType? TestType { get; set; } } diff --git a/Robust.UnitTesting/Shared/Serialization/YamlObjectSerializerTests/TypeSerialization_Test.cs b/Robust.Shared.IntegrationTests/Serialization/YamlObjectSerializerTests/TypeSerialization_Test.cs similarity index 96% rename from Robust.UnitTesting/Shared/Serialization/YamlObjectSerializerTests/TypeSerialization_Test.cs rename to Robust.Shared.IntegrationTests/Serialization/YamlObjectSerializerTests/TypeSerialization_Test.cs index 5c87bbbcd..667b89504 100644 --- a/Robust.UnitTesting/Shared/Serialization/YamlObjectSerializerTests/TypeSerialization_Test.cs +++ b/Robust.Shared.IntegrationTests/Serialization/YamlObjectSerializerTests/TypeSerialization_Test.cs @@ -10,7 +10,7 @@ using YamlDotNet.RepresentationModel; namespace Robust.UnitTesting.Shared.Serialization.YamlObjectSerializerTests { [TestFixture] - public sealed class TypeSerialization_Test : RobustUnitTest + internal sealed class TypeSerialization_Test : OurRobustUnitTest { [OneTimeSetUp] public void Setup() diff --git a/Robust.UnitTesting/Shared/Spawning/EntitySpawnHelpersTest.cs b/Robust.Shared.IntegrationTests/Spawning/EntitySpawnHelpersTest.cs similarity index 99% rename from Robust.UnitTesting/Shared/Spawning/EntitySpawnHelpersTest.cs rename to Robust.Shared.IntegrationTests/Spawning/EntitySpawnHelpersTest.cs index 1e28c20cb..a27470947 100644 --- a/Robust.UnitTesting/Shared/Spawning/EntitySpawnHelpersTest.cs +++ b/Robust.Shared.IntegrationTests/Spawning/EntitySpawnHelpersTest.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Numerics; using System.Threading.Tasks; using NUnit.Framework; +using Robust.Shared.Analyzers; using Robust.Shared.Containers; using Robust.Shared.GameObjects; using Robust.Shared.Map; diff --git a/Robust.UnitTesting/Shared/Spawning/SpawnInContainerOrDropTest.cs b/Robust.Shared.IntegrationTests/Spawning/SpawnInContainerOrDropTest.cs similarity index 98% rename from Robust.UnitTesting/Shared/Spawning/SpawnInContainerOrDropTest.cs rename to Robust.Shared.IntegrationTests/Spawning/SpawnInContainerOrDropTest.cs index 77fb3b7cd..873326292 100644 --- a/Robust.UnitTesting/Shared/Spawning/SpawnInContainerOrDropTest.cs +++ b/Robust.Shared.IntegrationTests/Spawning/SpawnInContainerOrDropTest.cs @@ -6,7 +6,7 @@ using Robust.Shared.Map; namespace Robust.UnitTesting.Shared.Spawning; [TestFixture] -public sealed class SpawnInContainerOrDropTest : EntitySpawnHelpersTest +internal sealed class SpawnInContainerOrDropTest : EntitySpawnHelpersTest { [Test] public async Task Test() diff --git a/Robust.UnitTesting/Shared/Spawning/SpawnNextToOrDropTest.cs b/Robust.Shared.IntegrationTests/Spawning/SpawnNextToOrDropTest.cs similarity index 98% rename from Robust.UnitTesting/Shared/Spawning/SpawnNextToOrDropTest.cs rename to Robust.Shared.IntegrationTests/Spawning/SpawnNextToOrDropTest.cs index 26458641a..b3bb82fd0 100644 --- a/Robust.UnitTesting/Shared/Spawning/SpawnNextToOrDropTest.cs +++ b/Robust.Shared.IntegrationTests/Spawning/SpawnNextToOrDropTest.cs @@ -6,7 +6,7 @@ using Robust.Shared.Map; namespace Robust.UnitTesting.Shared.Spawning; [TestFixture] -public sealed class SpawnNextToOrDropTest : EntitySpawnHelpersTest +internal sealed class SpawnNextToOrDropTest : EntitySpawnHelpersTest { [Test] public async Task Test() diff --git a/Robust.UnitTesting/Shared/Spawning/TrySpawnInContainerTest.cs b/Robust.Shared.IntegrationTests/Spawning/TrySpawnInContainerTest.cs similarity index 96% rename from Robust.UnitTesting/Shared/Spawning/TrySpawnInContainerTest.cs rename to Robust.Shared.IntegrationTests/Spawning/TrySpawnInContainerTest.cs index a526c0d1d..19d7ff8d9 100644 --- a/Robust.UnitTesting/Shared/Spawning/TrySpawnInContainerTest.cs +++ b/Robust.Shared.IntegrationTests/Spawning/TrySpawnInContainerTest.cs @@ -4,7 +4,7 @@ using NUnit.Framework; namespace Robust.UnitTesting.Shared.Spawning; [TestFixture] -public sealed class TrySpawnInContainerTest : EntitySpawnHelpersTest +internal sealed class TrySpawnInContainerTest : EntitySpawnHelpersTest { [Test] public async Task Test() diff --git a/Robust.UnitTesting/Shared/Spawning/TrySpawnNextToTest.cs b/Robust.Shared.IntegrationTests/Spawning/TrySpawnNextToTest.cs similarity index 96% rename from Robust.UnitTesting/Shared/Spawning/TrySpawnNextToTest.cs rename to Robust.Shared.IntegrationTests/Spawning/TrySpawnNextToTest.cs index 130a95f2f..3e837201c 100644 --- a/Robust.UnitTesting/Shared/Spawning/TrySpawnNextToTest.cs +++ b/Robust.Shared.IntegrationTests/Spawning/TrySpawnNextToTest.cs @@ -5,7 +5,7 @@ using Robust.Shared.GameObjects; namespace Robust.UnitTesting.Shared.Spawning; [TestFixture] -public sealed class TrySpawnNextToTest : EntitySpawnHelpersTest +internal sealed class TrySpawnNextToTest : EntitySpawnHelpersTest { [Test] public async Task Test() diff --git a/Robust.UnitTesting/Shared/TestRobustSerializerHash.cs b/Robust.Shared.IntegrationTests/TestRobustSerializerHash.cs similarity index 100% rename from Robust.UnitTesting/Shared/TestRobustSerializerHash.cs rename to Robust.Shared.IntegrationTests/TestRobustSerializerHash.cs diff --git a/Robust.UnitTesting/Shared/Timing/GameLoop_Test.cs b/Robust.Shared.IntegrationTests/Timing/GameLoop_Test.cs similarity index 97% rename from Robust.UnitTesting/Shared/Timing/GameLoop_Test.cs rename to Robust.Shared.IntegrationTests/Timing/GameLoop_Test.cs index 2bdc7ed2f..c3cd7f7b4 100644 --- a/Robust.UnitTesting/Shared/Timing/GameLoop_Test.cs +++ b/Robust.Shared.IntegrationTests/Timing/GameLoop_Test.cs @@ -11,7 +11,7 @@ namespace Robust.UnitTesting.Shared.Timing { [TestFixture] [TestOf(typeof(GameLoop))] - sealed class GameLoop_Test : RobustUnitTest + sealed class GameLoop_Test : OurRobustUnitTest { /// /// With single step enabled, the game loop should run 1 tick and then pause again. diff --git a/Robust.UnitTesting/Shared/Timing/TimerTest.cs b/Robust.Shared.IntegrationTests/Timing/TimerTest.cs similarity index 97% rename from Robust.UnitTesting/Shared/Timing/TimerTest.cs rename to Robust.Shared.IntegrationTests/Timing/TimerTest.cs index 17e218380..8d2535351 100644 --- a/Robust.UnitTesting/Shared/Timing/TimerTest.cs +++ b/Robust.Shared.IntegrationTests/Timing/TimerTest.cs @@ -11,7 +11,7 @@ namespace Robust.UnitTesting.Shared.Timing { [TestFixture] [TestOf(typeof(Timer))] - public sealed class TimerTest : RobustUnitTest + internal sealed class TimerTest : OurRobustUnitTest { private LogCatcher _catcher = default!; diff --git a/Robust.UnitTesting/Shared/Toolshed/ArithmeticTest.cs b/Robust.Shared.IntegrationTests/Toolshed/ArithmeticTest.cs similarity index 97% rename from Robust.UnitTesting/Shared/Toolshed/ArithmeticTest.cs rename to Robust.Shared.IntegrationTests/Toolshed/ArithmeticTest.cs index 660db2a48..7df189656 100644 --- a/Robust.UnitTesting/Shared/Toolshed/ArithmeticTest.cs +++ b/Robust.Shared.IntegrationTests/Toolshed/ArithmeticTest.cs @@ -7,7 +7,7 @@ using NUnit.Framework; namespace Robust.UnitTesting.Shared.Toolshed; [TestFixture] -public sealed class ArithmeticTest : ToolshedTest +internal sealed class ArithmeticTest : ToolshedTest { [Test] public async Task OrderOfOperations() diff --git a/Robust.UnitTesting/Shared/Toolshed/ErrorHandlingTest.cs b/Robust.Shared.IntegrationTests/Toolshed/ErrorHandlingTest.cs similarity index 94% rename from Robust.UnitTesting/Shared/Toolshed/ErrorHandlingTest.cs rename to Robust.Shared.IntegrationTests/Toolshed/ErrorHandlingTest.cs index 1b6030897..467b15743 100644 --- a/Robust.UnitTesting/Shared/Toolshed/ErrorHandlingTest.cs +++ b/Robust.Shared.IntegrationTests/Toolshed/ErrorHandlingTest.cs @@ -6,7 +6,7 @@ using Robust.Shared.Toolshed.Errors; namespace Robust.UnitTesting.Shared.Toolshed; [TestFixture] -public sealed class ErrorHandlingTest : ToolshedTest +internal sealed class ErrorHandlingTest : ToolshedTest { [Test] public async Task ExceptionsAreErrors() diff --git a/Robust.UnitTesting/Shared/Toolshed/LocTest.cs b/Robust.Shared.IntegrationTests/Toolshed/LocTest.cs similarity index 97% rename from Robust.UnitTesting/Shared/Toolshed/LocTest.cs rename to Robust.Shared.IntegrationTests/Toolshed/LocTest.cs index 4653556a2..d3b554824 100644 --- a/Robust.UnitTesting/Shared/Toolshed/LocTest.cs +++ b/Robust.Shared.IntegrationTests/Toolshed/LocTest.cs @@ -8,7 +8,7 @@ using Robust.Shared.Toolshed; namespace Robust.UnitTesting.Shared.Toolshed; [TestFixture] -public sealed class LocTest : ToolshedTest +internal sealed class LocTest : ToolshedTest { [Test] public async Task AllCommandsHaveDescriptions() diff --git a/Robust.UnitTesting/Shared/Toolshed/TestCommands.cs b/Robust.Shared.IntegrationTests/Toolshed/TestCommands.cs similarity index 72% rename from Robust.UnitTesting/Shared/Toolshed/TestCommands.cs rename to Robust.Shared.IntegrationTests/Toolshed/TestCommands.cs index 6207a7109..6b1c33ac7 100644 --- a/Robust.UnitTesting/Shared/Toolshed/TestCommands.cs +++ b/Robust.Shared.IntegrationTests/Toolshed/TestCommands.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Robust.Shared.Analyzers; using Robust.Shared.Console; using Robust.Shared.Prototypes; using Robust.Shared.Toolshed; @@ -12,27 +13,27 @@ namespace Robust.UnitTesting.Shared.Toolshed; // This file just contains a collection of various test commands for use in other tests. [ToolshedCommand] -public sealed class TestVoidCommand : ToolshedCommand +internal sealed class TestVoidCommand : ToolshedCommand { [CommandImplementation] public void Impl() {} } [ToolshedCommand] -public sealed class TestIntCommand : ToolshedCommand +internal sealed class TestIntCommand : ToolshedCommand { [CommandImplementation] public int Impl() => 1; } [ToolshedCommand] -public sealed class TestTypeArgCommand : ToolshedCommand +internal sealed class TestTypeArgCommand : ToolshedCommand { public override Type[] TypeParameterParsers => [typeof(TypeTypeParser)]; [CommandImplementation] public string Impl() => typeof(T).Name; } [ToolshedCommand] -public sealed class TestMultiTypeArgCommand : ToolshedCommand +internal sealed class TestMultiTypeArgCommand : ToolshedCommand { public override Type[] TypeParameterParsers => [typeof(TypeTypeParser), typeof(TypeTypeParser)]; [CommandImplementation] public string Impl(int i) @@ -40,19 +41,19 @@ public sealed class TestMultiTypeArgCommand : ToolshedCommand } [ToolshedCommand] -public sealed class TestIntStrArgCommand : ToolshedCommand +internal sealed class TestIntStrArgCommand : ToolshedCommand { [CommandImplementation] public int Impl(int i, string str) => i; } [ToolshedCommand] -public sealed class TestPipedIntCommand : ToolshedCommand +internal sealed class TestPipedIntCommand : ToolshedCommand { [CommandImplementation] public int Impl([PipedArgument] int i) => i; } [ToolshedCommand] -public sealed class TestCustomVarRefParserCommand : ToolshedCommand +internal sealed class TestCustomVarRefParserCommand : ToolshedCommand { [CommandImplementation] public int Impl([CommandArgument(typeof(Parser))] int i) => i; @@ -79,7 +80,7 @@ public sealed class TestCustomVarRefParserCommand : ToolshedCommand } [ToolshedCommand] -public sealed class TestOptionalArgsCommand : ToolshedCommand +internal sealed class TestOptionalArgsCommand : ToolshedCommand { [CommandImplementation] public int[] Impl(int x, int y = 0, int z = 1) @@ -87,7 +88,7 @@ public sealed class TestOptionalArgsCommand : ToolshedCommand } [ToolshedCommand] -public sealed class TestParamsCollectionCommand : ToolshedCommand +internal sealed class TestParamsCollectionCommand : ToolshedCommand { [CommandImplementation] public int[] Impl(int x, int y = 0, params int[] others) @@ -95,7 +96,7 @@ public sealed class TestParamsCollectionCommand : ToolshedCommand } [ToolshedCommand] -public sealed class TestParamsOnlyCommand : ToolshedCommand +internal sealed class TestParamsOnlyCommand : ToolshedCommand { [CommandImplementation] public int[] Impl(params int[] others) @@ -103,12 +104,12 @@ public sealed class TestParamsOnlyCommand : ToolshedCommand } [ToolshedCommand] -public sealed class TestCustomParserCommand : ToolshedCommand +internal sealed class TestCustomParserCommand : ToolshedCommand { [CommandImplementation] public int Impl([CommandArgument(typeof(Parser))] int i) => i; - public sealed class Parser : TestCustomVarRefParserCommand.Parser + internal sealed class Parser : TestCustomVarRefParserCommand.Parser { // Disable ValueRef support. // I.e., this parser will not not try to parse variables or blocks @@ -117,28 +118,28 @@ public sealed class TestCustomParserCommand : ToolshedCommand } [ToolshedCommand] -public sealed class TestEnumerableInferCommand : ToolshedCommand +internal sealed class TestEnumerableInferCommand : ToolshedCommand { [CommandImplementation, TakesPipedTypeAsGeneric] public Type Impl([PipedArgument] IEnumerable x, T y) => typeof(T); } [ToolshedCommand] -public sealed class TestListInferCommand : ToolshedCommand +internal sealed class TestListInferCommand : ToolshedCommand { [CommandImplementation, TakesPipedTypeAsGeneric] public Type Impl([PipedArgument] List x, T y) => typeof(T); } [ToolshedCommand] -public sealed class TestArrayInferCommand : ToolshedCommand +internal sealed class TestArrayInferCommand : ToolshedCommand { [CommandImplementation, TakesPipedTypeAsGeneric] public Type Impl([PipedArgument] T[] x, T y) => typeof(T); } [ToolshedCommand] -public sealed class TestNestedEnumerableInferCommand : ToolshedCommand +internal sealed class TestNestedEnumerableInferCommand : ToolshedCommand { [CommandImplementation, TakesPipedTypeAsGeneric] public Type Impl([PipedArgument] IEnumerable> x) @@ -149,7 +150,7 @@ public sealed class TestNestedEnumerableInferCommand : ToolshedCommand } [ToolshedCommand] -public sealed class TestNestedListInferCommand : ToolshedCommand +internal sealed class TestNestedListInferCommand : ToolshedCommand { [CommandImplementation, TakesPipedTypeAsGeneric] public Type Impl([PipedArgument] List> x) @@ -160,7 +161,7 @@ public sealed class TestNestedListInferCommand : ToolshedCommand } [ToolshedCommand] -public sealed class TestNestedArrayInferCommand : ToolshedCommand +internal sealed class TestNestedArrayInferCommand : ToolshedCommand { [CommandImplementation, TakesPipedTypeAsGeneric] public Type Impl([PipedArgument] ProtoId[] x) @@ -171,21 +172,21 @@ public sealed class TestNestedArrayInferCommand : ToolshedCommand } [ToolshedCommand] -public sealed class TestArrayCommand : ToolshedCommand +internal sealed class TestArrayCommand : ToolshedCommand { [CommandImplementation] public int[] Impl() => Array.Empty(); } [ToolshedCommand] -public sealed class TestListCommand : ToolshedCommand +internal sealed class TestListCommand : ToolshedCommand { [CommandImplementation] public List Impl() => new(); } [ToolshedCommand] -public sealed class TestEnumerableCommand : ToolshedCommand +internal sealed class TestEnumerableCommand : ToolshedCommand { private static int[] _arr = {1, 3, 3}; @@ -194,21 +195,21 @@ public sealed class TestEnumerableCommand : ToolshedCommand } [ToolshedCommand] -public sealed class TestNestedArrayCommand : ToolshedCommand +internal sealed class TestNestedArrayCommand : ToolshedCommand { [CommandImplementation] public ProtoId[] Impl() => []; } [ToolshedCommand] -public sealed class TestNestedListCommand : ToolshedCommand +internal sealed class TestNestedListCommand : ToolshedCommand { [CommandImplementation] public List> Impl() => new(); } [ToolshedCommand] -public sealed class TestNestedEnumerableCommand : ToolshedCommand +internal sealed class TestNestedEnumerableCommand : ToolshedCommand { private static ProtoId[] _arr = []; @@ -217,13 +218,13 @@ public sealed class TestNestedEnumerableCommand : ToolshedCommand } [ToolshedCommand] -public sealed class TestImplicitImplCommand : ToolshedCommand +internal sealed class TestImplicitImplCommand : ToolshedCommand { public int Impl() => 1; } [ToolshedCommand] -public sealed class TestExplicitImplCommand : ToolshedCommand +internal sealed class TestExplicitImplCommand : ToolshedCommand { public int Impl() => 1; diff --git a/Robust.UnitTesting/Shared/Toolshed/ToolshedParserTest.Bugcheck.cs b/Robust.Shared.IntegrationTests/Toolshed/ToolshedParserTest.Bugcheck.cs similarity index 95% rename from Robust.UnitTesting/Shared/Toolshed/ToolshedParserTest.Bugcheck.cs rename to Robust.Shared.IntegrationTests/Toolshed/ToolshedParserTest.Bugcheck.cs index b444289f7..444074d5b 100644 --- a/Robust.UnitTesting/Shared/Toolshed/ToolshedParserTest.Bugcheck.cs +++ b/Robust.Shared.IntegrationTests/Toolshed/ToolshedParserTest.Bugcheck.cs @@ -8,7 +8,7 @@ namespace Robust.UnitTesting.Shared.Toolshed; // Find a silly little bug or a goof? // Add a test here to make sure it doesn't come back. -public sealed partial class ToolshedParserTest +internal sealed partial class ToolshedParserTest { // Memorializing the fact I never fixed this shit in BQL reee [Test, TestOf(typeof(Quantity))] diff --git a/Robust.UnitTesting/Shared/Toolshed/ToolshedParserTest.Core.cs b/Robust.Shared.IntegrationTests/Toolshed/ToolshedParserTest.Core.cs similarity index 98% rename from Robust.UnitTesting/Shared/Toolshed/ToolshedParserTest.Core.cs rename to Robust.Shared.IntegrationTests/Toolshed/ToolshedParserTest.Core.cs index 0364c0d40..8251f42b1 100644 --- a/Robust.UnitTesting/Shared/Toolshed/ToolshedParserTest.Core.cs +++ b/Robust.Shared.IntegrationTests/Toolshed/ToolshedParserTest.Core.cs @@ -9,7 +9,7 @@ using Robust.Shared.Utility; namespace Robust.UnitTesting.Shared.Toolshed; -public sealed partial class ToolshedParserTest +internal sealed partial class ToolshedParserTest { [Test] public async Task AllCoreTypesParseable() diff --git a/Robust.UnitTesting/Shared/Toolshed/ToolshedParserTest.cs b/Robust.Shared.IntegrationTests/Toolshed/ToolshedParserTest.cs similarity index 98% rename from Robust.UnitTesting/Shared/Toolshed/ToolshedParserTest.cs rename to Robust.Shared.IntegrationTests/Toolshed/ToolshedParserTest.cs index e966fe023..94522fb30 100644 --- a/Robust.UnitTesting/Shared/Toolshed/ToolshedParserTest.cs +++ b/Robust.Shared.IntegrationTests/Toolshed/ToolshedParserTest.cs @@ -12,7 +12,7 @@ using Robust.Shared.Toolshed.TypeParsers.Math; namespace Robust.UnitTesting.Shared.Toolshed; [TestFixture] -public sealed partial class ToolshedParserTest : ToolshedTest +internal sealed partial class ToolshedParserTest : ToolshedTest { [Test] public async Task SimpleCommandRun() diff --git a/Robust.UnitTesting/Shared/Toolshed/ToolshedTest.cs b/Robust.Shared.IntegrationTests/Toolshed/ToolshedTest.cs similarity index 100% rename from Robust.UnitTesting/Shared/Toolshed/ToolshedTest.cs rename to Robust.Shared.IntegrationTests/Toolshed/ToolshedTest.cs diff --git a/Robust.UnitTesting/Shared/Toolshed/ToolshedTests.cs b/Robust.Shared.IntegrationTests/Toolshed/ToolshedTests.cs similarity index 99% rename from Robust.UnitTesting/Shared/Toolshed/ToolshedTests.cs rename to Robust.Shared.IntegrationTests/Toolshed/ToolshedTests.cs index 38f99237c..24297ea81 100644 --- a/Robust.UnitTesting/Shared/Toolshed/ToolshedTests.cs +++ b/Robust.Shared.IntegrationTests/Toolshed/ToolshedTests.cs @@ -17,7 +17,7 @@ namespace Robust.UnitTesting.Shared.Toolshed; /// Collection of miscellaneous toolshed command tests. /// Several of these were just added ad hoc as bugs arose. /// -public sealed class ToolshedTests : ToolshedTest +internal sealed class ToolshedTests : ToolshedTest { // TODO Robust.UnitTesting // split these into separate [TestCase]s when we have pooling. diff --git a/Robust.UnitTesting/Shared/Toolshed/ToolshedTypesTest.BugCheck.cs b/Robust.Shared.IntegrationTests/Toolshed/ToolshedTypesTest.BugCheck.cs similarity index 89% rename from Robust.UnitTesting/Shared/Toolshed/ToolshedTypesTest.BugCheck.cs rename to Robust.Shared.IntegrationTests/Toolshed/ToolshedTypesTest.BugCheck.cs index 740d3f099..0f5d60792 100644 --- a/Robust.UnitTesting/Shared/Toolshed/ToolshedTypesTest.BugCheck.cs +++ b/Robust.Shared.IntegrationTests/Toolshed/ToolshedTypesTest.BugCheck.cs @@ -4,7 +4,7 @@ using NUnit.Framework; namespace Robust.UnitTesting.Shared.Toolshed; -public sealed partial class ToolshedTypesTest +internal sealed partial class ToolshedTypesTest { // Assert that T -> Nullable holds and it's inverse does not. [Test] diff --git a/Robust.UnitTesting/Shared/Toolshed/ToolshedTypesTest.cs b/Robust.Shared.IntegrationTests/Toolshed/ToolshedTypesTest.cs similarity index 96% rename from Robust.UnitTesting/Shared/Toolshed/ToolshedTypesTest.cs rename to Robust.Shared.IntegrationTests/Toolshed/ToolshedTypesTest.cs index 0da055b21..5bc9edd4a 100644 --- a/Robust.UnitTesting/Shared/Toolshed/ToolshedTypesTest.cs +++ b/Robust.Shared.IntegrationTests/Toolshed/ToolshedTypesTest.cs @@ -7,7 +7,7 @@ using NUnit.Framework; namespace Robust.UnitTesting.Shared.Toolshed; [TestFixture] -public sealed partial class ToolshedTypesTest : ToolshedTest +internal sealed partial class ToolshedTypesTest : ToolshedTest { // Assert that T -> IEnumerable holds. [Test] diff --git a/Robust.UnitTesting/Shared/Toolshed/ToolshedValidationTest.cs b/Robust.Shared.IntegrationTests/Toolshed/ToolshedValidationTest.cs similarity index 83% rename from Robust.UnitTesting/Shared/Toolshed/ToolshedValidationTest.cs rename to Robust.Shared.IntegrationTests/Toolshed/ToolshedValidationTest.cs index 4b485ed88..aae556acf 100644 --- a/Robust.UnitTesting/Shared/Toolshed/ToolshedValidationTest.cs +++ b/Robust.Shared.IntegrationTests/Toolshed/ToolshedValidationTest.cs @@ -9,7 +9,7 @@ using Robust.Shared.Utility; namespace Robust.UnitTesting.Shared.Toolshed; -public sealed class ToolshedValidationTest : ToolshedTest +internal sealed class ToolshedValidationTest : ToolshedTest { #if DEBUG [Test] @@ -56,7 +56,7 @@ public sealed class ToolshedValidationTest : ToolshedTest #region InvalidCommands // Not enough type argument parsers [ToolshedCommand, Reflect(false)] -public sealed class TestInvalid1Command : ToolshedCommand +internal sealed class TestInvalid1Command : ToolshedCommand { public override Type[] TypeParameterParsers => [typeof(TypeTypeParser)]; [CommandImplementation] public void Impl() {} @@ -64,7 +64,7 @@ public sealed class TestInvalid1Command : ToolshedCommand // too many type argument parsers [ToolshedCommand, Reflect(false)] -public sealed class TestInvalid2Command : ToolshedCommand +internal sealed class TestInvalid2Command : ToolshedCommand { public override Type[] TypeParameterParsers => [typeof(TypeTypeParser), typeof(TypeTypeParser)]; [CommandImplementation] @@ -73,7 +73,7 @@ public sealed class TestInvalid2Command : ToolshedCommand // The generic has to be the LAST entry, not the first [ToolshedCommand, Reflect(false)] -public sealed class TestInvalid3Command : ToolshedCommand +internal sealed class TestInvalid3Command : ToolshedCommand { public override Type[] TypeParameterParsers => [typeof(TypeTypeParser)]; [CommandImplementation, TakesPipedTypeAsGeneric] @@ -81,7 +81,7 @@ public sealed class TestInvalid3Command : ToolshedCommand } [ToolshedCommand, Reflect(false)] -public sealed class TestInvalid4Command : ToolshedCommand +internal sealed class TestInvalid4Command : ToolshedCommand { public override Type[] TypeParameterParsers => [typeof(TypeTypeParser)]; [CommandImplementation, TakesPipedTypeAsGeneric] @@ -90,7 +90,7 @@ public sealed class TestInvalid4Command : ToolshedCommand // [TakesPipedTypeAsGeneric] without a [PipedArgument] [ToolshedCommand, Reflect(false)] -public sealed class TestInvalid5Command : ToolshedCommand +internal sealed class TestInvalid5Command : ToolshedCommand { [CommandImplementation, TakesPipedTypeAsGeneric] public void Impl() {} @@ -98,7 +98,7 @@ public sealed class TestInvalid5Command : ToolshedCommand // Duplicate [PipedArgument] [ToolshedCommand, Reflect(false)] -public sealed class TestInvalid6Command : ToolshedCommand +internal sealed class TestInvalid6Command : ToolshedCommand { [CommandImplementation] public void Impl([PipedArgument] int arg1, [PipedArgument] int arg2) {} @@ -106,7 +106,7 @@ public sealed class TestInvalid6Command : ToolshedCommand // Conflicting arguments [ToolshedCommand, Reflect(false)] -public sealed class TestInvalid7Command : ToolshedCommand +internal sealed class TestInvalid7Command : ToolshedCommand { [CommandImplementation] public void Impl([CommandArgument, PipedArgument] int arg1) {} @@ -114,7 +114,7 @@ public sealed class TestInvalid7Command : ToolshedCommand // Conflicting arguments [ToolshedCommand, Reflect(false)] -public sealed class TestInvalid8Command : ToolshedCommand +internal sealed class TestInvalid8Command : ToolshedCommand { [CommandImplementation] public void Impl([CommandInvocationContext, PipedArgument] int arg1) {} @@ -122,7 +122,7 @@ public sealed class TestInvalid8Command : ToolshedCommand // wrong [CommandInvocationContext] type [ToolshedCommand, Reflect(false)] -public sealed class TestInvalid9Command : ToolshedCommand +internal sealed class TestInvalid9Command : ToolshedCommand { [CommandImplementation] public void Impl([CommandInvocationContext] int arg1) {} @@ -130,7 +130,7 @@ public sealed class TestInvalid9Command : ToolshedCommand // wrong [CommandInverted] type [ToolshedCommand, Reflect(false)] -public sealed class TestInvalid10Command : ToolshedCommand +internal sealed class TestInvalid10Command : ToolshedCommand { [CommandImplementation] public void Impl([CommandInverted] int arg1) {} @@ -138,7 +138,7 @@ public sealed class TestInvalid10Command : ToolshedCommand // duplicate [CommandInverted] [ToolshedCommand, Reflect(false)] -public sealed class TestInvalid11Command : ToolshedCommand +internal sealed class TestInvalid11Command : ToolshedCommand { [CommandImplementation] public void Impl([CommandInverted] bool arg1, [CommandInverted] bool arg2) {} @@ -146,7 +146,7 @@ public sealed class TestInvalid11Command : ToolshedCommand // duplicate [CommandInvocationContext] [ToolshedCommand, Reflect(false)] -public sealed class TestInvalid12Command : ToolshedCommand +internal sealed class TestInvalid12Command : ToolshedCommand { [CommandImplementation] public void Impl([CommandInvocationContext] IInvocationContext arg1, [CommandInvocationContext] IInvocationContext arg2) {} @@ -154,7 +154,7 @@ public sealed class TestInvalid12Command : ToolshedCommand // Too few type parsers, along with a TakesPipedTypeAsGeneric [ToolshedCommand, Reflect(false)] -public sealed class TestInvalid13Command : ToolshedCommand +internal sealed class TestInvalid13Command : ToolshedCommand { public override Type[] TypeParameterParsers => [typeof(TypeTypeParser)]; [CommandImplementation, TakesPipedTypeAsGeneric] @@ -163,7 +163,7 @@ public sealed class TestInvalid13Command : ToolshedCommand // Too many type parsers, along with a TakesPipedTypeAsGeneric [ToolshedCommand, Reflect(false)] -public sealed class TestInvalid14Command : ToolshedCommand +internal sealed class TestInvalid14Command : ToolshedCommand { public override Type[] TypeParameterParsers => [typeof(TypeTypeParser), typeof(TypeTypeParser)]; [CommandImplementation, TakesPipedTypeAsGeneric] @@ -172,7 +172,7 @@ public sealed class TestInvalid14Command : ToolshedCommand // [TakesPipedTypeAsGeneric] on a non-generic metod [ToolshedCommand, Reflect(false)] -public sealed class TestInvalid15Command : ToolshedCommand +internal sealed class TestInvalid15Command : ToolshedCommand { [CommandImplementation, TakesPipedTypeAsGeneric] public void Impl([PipedArgument] int i) {} @@ -180,7 +180,7 @@ public sealed class TestInvalid15Command : ToolshedCommand // type arguments on a non-generic metod [ToolshedCommand, Reflect(false)] -public sealed class TestInvalid16Command : ToolshedCommand +internal sealed class TestInvalid16Command : ToolshedCommand { public override Type[] TypeParameterParsers => [typeof(TypeTypeParser)]; [CommandImplementation] public void Impl() {} @@ -188,7 +188,7 @@ public sealed class TestInvalid16Command : ToolshedCommand // Duplicate mixed explicit/implicit [CommandInvocationContext] [ToolshedCommand, Reflect(false)] -public sealed class TestInvalid17Command : ToolshedCommand +internal sealed class TestInvalid17Command : ToolshedCommand { [CommandImplementation] public void Impl([CommandInvocationContext] IInvocationContext arg1, IInvocationContext arg2) {} @@ -197,7 +197,7 @@ public sealed class TestInvalid17Command : ToolshedCommand // Duplicate implicit [CommandInvocationContext] [ToolshedCommand, Reflect(false)] -public sealed class TestInvalid18Command : ToolshedCommand +internal sealed class TestInvalid18Command : ToolshedCommand { [CommandImplementation] public void Impl(IInvocationContext arg1, IInvocationContext arg2) {} diff --git a/Robust.UnitTesting/Shared/TransformTests/GridTraversalTest.cs b/Robust.Shared.IntegrationTests/TransformTests/GridTraversalTest.cs similarity index 98% rename from Robust.UnitTesting/Shared/TransformTests/GridTraversalTest.cs rename to Robust.Shared.IntegrationTests/TransformTests/GridTraversalTest.cs index 451c75b3e..92401b30d 100644 --- a/Robust.UnitTesting/Shared/TransformTests/GridTraversalTest.cs +++ b/Robust.Shared.IntegrationTests/TransformTests/GridTraversalTest.cs @@ -8,7 +8,7 @@ using Robust.Shared.Maths; namespace Robust.UnitTesting.Shared.TransformTests; -public sealed class GridTraversalTest : RobustIntegrationTest +internal sealed class GridTraversalTest : RobustIntegrationTest { [Test] public async Task TestSpawnTraversal() diff --git a/Robust.UnitTesting/ApproxEqualityConstraint.cs b/Robust.Shared.Maths.Testing/ApproxEqualityConstraint.cs similarity index 89% rename from Robust.UnitTesting/ApproxEqualityConstraint.cs rename to Robust.Shared.Maths.Testing/ApproxEqualityConstraint.cs index a3a43f47a..ea596f627 100644 --- a/Robust.UnitTesting/ApproxEqualityConstraint.cs +++ b/Robust.Shared.Maths.Testing/ApproxEqualityConstraint.cs @@ -1,8 +1,10 @@ using System.Numerics; using System.Runtime.Intrinsics; +using NUnit.Framework; using NUnit.Framework.Constraints; using Robust.Shared.Maths; +// ReSharper disable once CheckNamespace namespace Robust.UnitTesting { public sealed class ApproxEqualityConstraint : Constraint @@ -86,4 +88,15 @@ namespace Robust.UnitTesting public override string Description => $"approximately {Expected}"; } + + public static class ApproxEqualityConstraintExtensions + { + extension(Is) + { + public static ApproxEqualityConstraint Approximately(object expected, double? tolerance = null) + { + return new ApproxEqualityConstraint(expected, tolerance); + } + } + } } diff --git a/Robust.Shared.Maths.Testing/Robust.Shared.Maths.Testing.csproj b/Robust.Shared.Maths.Testing/Robust.Shared.Maths.Testing.csproj new file mode 100644 index 000000000..5b1334f32 --- /dev/null +++ b/Robust.Shared.Maths.Testing/Robust.Shared.Maths.Testing.csproj @@ -0,0 +1,20 @@ + + + + + enable + false + + + + + + + + + + + + + + diff --git a/Robust.UnitTesting/Shared/Maths/Angle_Test.cs b/Robust.Shared.Maths.Tests/Angle_Test.cs similarity index 97% rename from Robust.UnitTesting/Shared/Maths/Angle_Test.cs rename to Robust.Shared.Maths.Tests/Angle_Test.cs index 9e7494f7f..bd3ab4cad 100644 --- a/Robust.UnitTesting/Shared/Maths/Angle_Test.cs +++ b/Robust.Shared.Maths.Tests/Angle_Test.cs @@ -1,15 +1,13 @@ -using System; -using System.Collections.Generic; using System.Numerics; -using Robust.Shared.Maths; using NUnit.Framework; +using Robust.UnitTesting; -namespace Robust.UnitTesting.Shared.Maths +namespace Robust.Shared.Maths.Tests { [Parallelizable(ParallelScope.All | ParallelScope.Fixtures)] [TestFixture] [TestOf(typeof(Angle))] - public sealed class Angle_Test + internal sealed class Angle_Test { private const double Epsilon = 1.0e-8; diff --git a/Robust.Shared.Maths.Tests/AssemblyInfo.cs b/Robust.Shared.Maths.Tests/AssemblyInfo.cs new file mode 100644 index 000000000..93a9461c1 --- /dev/null +++ b/Robust.Shared.Maths.Tests/AssemblyInfo.cs @@ -0,0 +1,3 @@ +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Robust.Shared.Tests")] diff --git a/Robust.UnitTesting/Shared/Maths/Box2Rotated_Test.cs b/Robust.Shared.Maths.Tests/Box2Rotated_Test.cs similarity index 96% rename from Robust.UnitTesting/Shared/Maths/Box2Rotated_Test.cs rename to Robust.Shared.Maths.Tests/Box2Rotated_Test.cs index 79ab097fb..220861725 100644 --- a/Robust.UnitTesting/Shared/Maths/Box2Rotated_Test.cs +++ b/Robust.Shared.Maths.Tests/Box2Rotated_Test.cs @@ -1,15 +1,12 @@ -using System; -using System.Collections.Generic; using System.Numerics; -using System.Runtime.Intrinsics.X86; using NUnit.Framework; -using Robust.Shared.Maths; +using Robust.UnitTesting; -namespace Robust.UnitTesting.Shared.Maths +namespace Robust.Shared.Maths.Tests { [TestFixture] [TestOf(typeof(Box2Rotated))] - public sealed class Box2Rotated_Test + internal sealed class Box2Rotated_Test { private static IEnumerable BoxRotations = new[] { diff --git a/Robust.UnitTesting/Shared/Maths/Box2_Test.cs b/Robust.Shared.Maths.Tests/Box2_Test.cs similarity index 98% rename from Robust.UnitTesting/Shared/Maths/Box2_Test.cs rename to Robust.Shared.Maths.Tests/Box2_Test.cs index 505fbc358..80c458fe7 100644 --- a/Robust.UnitTesting/Shared/Maths/Box2_Test.cs +++ b/Robust.Shared.Maths.Tests/Box2_Test.cs @@ -1,15 +1,12 @@ -using System; -using System.Collections.Generic; -using System.Numerics; +using System.Numerics; using NUnit.Framework; -using Robust.Shared.Maths; -namespace Robust.UnitTesting.Shared.Maths +namespace Robust.Shared.Maths.Tests { [Parallelizable(ParallelScope.All | ParallelScope.Fixtures)] [TestFixture] [TestOf(typeof(Box2))] - public sealed class Box2_Test + internal sealed class Box2_Test { private static IEnumerable<(float left, float bottom, float right, float top)> Sources => new (float, float, float, float)[] diff --git a/Robust.UnitTesting/Shared/Maths/Box2i_Test.cs b/Robust.Shared.Maths.Tests/Box2i_Test.cs similarity index 91% rename from Robust.UnitTesting/Shared/Maths/Box2i_Test.cs rename to Robust.Shared.Maths.Tests/Box2i_Test.cs index 5f1a85ceb..c924fc50f 100644 --- a/Robust.UnitTesting/Shared/Maths/Box2i_Test.cs +++ b/Robust.Shared.Maths.Tests/Box2i_Test.cs @@ -1,10 +1,9 @@ using NUnit.Framework; -using Robust.Shared.Maths; -namespace Robust.UnitTesting.Shared.Maths +namespace Robust.Shared.Maths.Tests { [TestFixture, Parallelizable, TestOf(typeof(Box2i))] - sealed class Box2i_Test + internal sealed class Box2i_Test { [Test] public void Box2iUnion() diff --git a/Robust.UnitTesting/Shared/Maths/Circle_Test.cs b/Robust.Shared.Maths.Tests/Circle_Test.cs similarity index 97% rename from Robust.UnitTesting/Shared/Maths/Circle_Test.cs rename to Robust.Shared.Maths.Tests/Circle_Test.cs index e251d5f82..861912a32 100644 --- a/Robust.UnitTesting/Shared/Maths/Circle_Test.cs +++ b/Robust.Shared.Maths.Tests/Circle_Test.cs @@ -1,15 +1,12 @@ -using System; -using System.Collections.Generic; -using System.Numerics; +using System.Numerics; using NUnit.Framework; -using Robust.Shared.Maths; -namespace Robust.UnitTesting.Shared.Maths +namespace Robust.Shared.Maths.Tests { [Parallelizable(ParallelScope.All | ParallelScope.Fixtures)] [TestFixture] [TestOf(typeof(Circle))] - public sealed class Circle_Test + internal sealed class Circle_Test { private static IEnumerable Coordinates => new float[] { -1, 0, 1 }; diff --git a/Robust.UnitTesting/Shared/ColorUtils_Test.cs b/Robust.Shared.Maths.Tests/ColorUtils_Test.cs similarity index 94% rename from Robust.UnitTesting/Shared/ColorUtils_Test.cs rename to Robust.Shared.Maths.Tests/ColorUtils_Test.cs index f43a35159..3f4be588e 100644 --- a/Robust.UnitTesting/Shared/ColorUtils_Test.cs +++ b/Robust.Shared.Maths.Tests/ColorUtils_Test.cs @@ -1,11 +1,10 @@ -using Robust.Shared.Maths; -using NUnit.Framework; +using NUnit.Framework; -namespace Robust.UnitTesting.Shared +namespace Robust.Shared.Maths.Tests { [Parallelizable(ParallelScope.All | ParallelScope.Fixtures)] [TestFixture] - public sealed class ColorUtils_Test + internal sealed class ColorUtils_Test { [Test] public void TestInterpolateBetween() diff --git a/Robust.UnitTesting/Shared/Maths/Color_Test.cs b/Robust.Shared.Maths.Tests/Color_Test.cs similarity index 98% rename from Robust.UnitTesting/Shared/Maths/Color_Test.cs rename to Robust.Shared.Maths.Tests/Color_Test.cs index 593a94981..1554d0cc6 100644 --- a/Robust.UnitTesting/Shared/Maths/Color_Test.cs +++ b/Robust.Shared.Maths.Tests/Color_Test.cs @@ -1,15 +1,11 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using NUnit.Framework; -using Robust.Shared.Maths; +using NUnit.Framework; -namespace Robust.UnitTesting.Shared.Maths +namespace Robust.Shared.Maths.Tests { [Parallelizable(ParallelScope.All | ParallelScope.Fixtures)] [TestFixture] [TestOf(typeof(Color))] - public sealed class Color_Test + internal sealed class Color_Test { static IEnumerable BytesSource = new byte[] { diff --git a/Robust.UnitTesting/Shared/Maths/Direction_Test.cs b/Robust.Shared.Maths.Tests/Direction_Test.cs similarity index 95% rename from Robust.UnitTesting/Shared/Maths/Direction_Test.cs rename to Robust.Shared.Maths.Tests/Direction_Test.cs index b55a3b62c..ad019de77 100644 --- a/Robust.UnitTesting/Shared/Maths/Direction_Test.cs +++ b/Robust.Shared.Maths.Tests/Direction_Test.cs @@ -1,9 +1,8 @@ -using System.Collections.Generic; -using System.Numerics; -using Robust.Shared.Maths; +using System.Numerics; using NUnit.Framework; +using Robust.UnitTesting; -namespace Robust.UnitTesting.Shared.Maths +namespace Robust.Shared.Maths.Tests { [Parallelizable(ParallelScope.All | ParallelScope.Fixtures)] [TestFixture] diff --git a/Robust.UnitTesting/Shared/Maths/Matrix3_Test.cs b/Robust.Shared.Maths.Tests/Matrix3_Test.cs similarity index 97% rename from Robust.UnitTesting/Shared/Maths/Matrix3_Test.cs rename to Robust.Shared.Maths.Tests/Matrix3_Test.cs index a6016f3a6..c5b2fa9dd 100644 --- a/Robust.UnitTesting/Shared/Maths/Matrix3_Test.cs +++ b/Robust.Shared.Maths.Tests/Matrix3_Test.cs @@ -1,15 +1,13 @@ -using System; -using System.Collections.Generic; using System.Numerics; using NUnit.Framework; -using Robust.Shared.Maths; +using Robust.UnitTesting; -namespace Robust.UnitTesting.Shared.Maths +namespace Robust.Shared.Maths.Tests { [TestFixture] [Parallelizable(ParallelScope.All | ParallelScope.Fixtures)] [TestOf(typeof(Matrix3x2))] - public sealed class Matrix3_Test + internal sealed class Matrix3_Test { private static readonly TestCaseData[] Rotations = new TestCaseData[] { diff --git a/Robust.UnitTesting/Shared/Maths/NumericsHelpers_Test.cs b/Robust.Shared.Maths.Tests/NumericsHelpers_Test.cs similarity index 99% rename from Robust.UnitTesting/Shared/Maths/NumericsHelpers_Test.cs rename to Robust.Shared.Maths.Tests/NumericsHelpers_Test.cs index 575338755..8abb2c7fb 100644 --- a/Robust.UnitTesting/Shared/Maths/NumericsHelpers_Test.cs +++ b/Robust.Shared.Maths.Tests/NumericsHelpers_Test.cs @@ -1,18 +1,16 @@ -using System; -using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; -using System.Runtime.Intrinsics.X86; -using NUnit.Framework; -using Robust.Shared.Maths; -using Microsoft.DotNet.RemoteExecutor; +using System.Diagnostics; using System.Runtime.Intrinsics.Arm; +using System.Runtime.Intrinsics.X86; +using Microsoft.DotNet.RemoteExecutor; +using NUnit.Framework; +using Robust.UnitTesting; -namespace Robust.UnitTesting.Shared.Maths +namespace Robust.Shared.Maths.Tests { [Parallelizable(ParallelScope.All | ParallelScope.Fixtures)] [TestFixture] [TestOf(typeof(NumericsHelpers))] - public sealed class NumericsHelpers_Test + internal sealed class NumericsHelpers_Test { #region Utils diff --git a/Robust.UnitTesting/Shared/Maths/Ray_Test.cs b/Robust.Shared.Maths.Tests/Ray_Test.cs similarity index 87% rename from Robust.UnitTesting/Shared/Maths/Ray_Test.cs rename to Robust.Shared.Maths.Tests/Ray_Test.cs index 71c523b51..05713c6ce 100644 --- a/Robust.UnitTesting/Shared/Maths/Ray_Test.cs +++ b/Robust.Shared.Maths.Tests/Ray_Test.cs @@ -1,14 +1,13 @@ using System.Numerics; using NUnit.Framework; -using Robust.Shared.Maths; using Robust.Shared.Physics; -namespace Robust.UnitTesting.Shared.Maths +namespace Robust.Shared.Maths.Tests { [TestFixture] [Parallelizable(ParallelScope.All | ParallelScope.Fixtures)] [TestOf(typeof(Ray))] - sealed class Ray_Test + internal sealed class Ray_Test { [Test] public void RayIntersectsBoxTest() diff --git a/Robust.Shared.Maths.Tests/Robust.Shared.Maths.Tests.csproj b/Robust.Shared.Maths.Tests/Robust.Shared.Maths.Tests.csproj new file mode 100644 index 000000000..b38a407f6 --- /dev/null +++ b/Robust.Shared.Maths.Tests/Robust.Shared.Maths.Tests.csproj @@ -0,0 +1,24 @@ + + + + + enable + + + + + + + + + + + + + + + + + + + diff --git a/Robust.UnitTesting/Shared/Maths/SimdHelpersTest.cs b/Robust.Shared.Maths.Tests/SimdHelpersTest.cs similarity index 91% rename from Robust.UnitTesting/Shared/Maths/SimdHelpersTest.cs rename to Robust.Shared.Maths.Tests/SimdHelpersTest.cs index c511bcf02..d4c81ab63 100644 --- a/Robust.UnitTesting/Shared/Maths/SimdHelpersTest.cs +++ b/Robust.Shared.Maths.Tests/SimdHelpersTest.cs @@ -1,8 +1,7 @@ using System.Runtime.Intrinsics; using NUnit.Framework; -using Robust.Shared.Maths; -namespace Robust.UnitTesting.Shared.Maths; +namespace Robust.Shared.Maths.Tests; [TestFixture] [Parallelizable] diff --git a/Robust.UnitTesting/Shared/Maths/UIBox2_Test.cs b/Robust.Shared.Maths.Tests/UIBox2_Test.cs similarity index 98% rename from Robust.UnitTesting/Shared/Maths/UIBox2_Test.cs rename to Robust.Shared.Maths.Tests/UIBox2_Test.cs index 9caabaf85..b3941482d 100644 --- a/Robust.UnitTesting/Shared/Maths/UIBox2_Test.cs +++ b/Robust.Shared.Maths.Tests/UIBox2_Test.cs @@ -1,15 +1,12 @@ -using System; -using System.Collections.Generic; -using System.Numerics; +using System.Numerics; using NUnit.Framework; -using Robust.Shared.Maths; -namespace Robust.UnitTesting.Shared.Maths +namespace Robust.Shared.Maths.Tests { [Parallelizable(ParallelScope.All | ParallelScope.Fixtures)] [TestFixture] [TestOf(typeof(UIBox2))] - public sealed class UIBox2_Test + internal sealed class UIBox2_Test { private static IEnumerable<(float left, float top, float right, float bottom)> Sources => new (float, float, float, float)[] { diff --git a/Robust.UnitTesting/Shared/Maths/UIBox2i_Test.cs b/Robust.Shared.Maths.Tests/UIBox2i_Test.cs similarity index 97% rename from Robust.UnitTesting/Shared/Maths/UIBox2i_Test.cs rename to Robust.Shared.Maths.Tests/UIBox2i_Test.cs index e13dba3c8..604d2c403 100644 --- a/Robust.UnitTesting/Shared/Maths/UIBox2i_Test.cs +++ b/Robust.Shared.Maths.Tests/UIBox2i_Test.cs @@ -1,14 +1,11 @@ -using System; -using System.Collections.Generic; -using NUnit.Framework; -using Robust.Shared.Maths; +using NUnit.Framework; -namespace Robust.UnitTesting.Shared.Maths +namespace Robust.Shared.Maths.Tests { [Parallelizable(ParallelScope.All | ParallelScope.Fixtures)] [TestFixture] [TestOf(typeof(UIBox2i))] - public sealed class UIBox2i_Test + internal sealed class UIBox2i_Test { private static IEnumerable<(int left, int top, int right, int bottom)> Sources => new (int, int, int, int)[] { diff --git a/Robust.UnitTesting/Shared/Maths/Vector2_Test.cs b/Robust.Shared.Maths.Tests/Vector2_Test.cs similarity index 96% rename from Robust.UnitTesting/Shared/Maths/Vector2_Test.cs rename to Robust.Shared.Maths.Tests/Vector2_Test.cs index a39b2fd66..273beb189 100644 --- a/Robust.UnitTesting/Shared/Maths/Vector2_Test.cs +++ b/Robust.Shared.Maths.Tests/Vector2_Test.cs @@ -1,13 +1,12 @@ using System.Numerics; using NUnit.Framework; -using Robust.Shared.Maths; -namespace Robust.UnitTesting.Shared.Maths +namespace Robust.Shared.Maths.Tests { [TestFixture] [Parallelizable(ParallelScope.All | ParallelScope.Fixtures)] [TestOf(typeof(Vector2))] - public sealed class Vector2_Test + internal sealed class Vector2_Test { [Test] [Sequential] diff --git a/Robust.UnitTesting/Shared/Maths/Vector2u_Test.cs b/Robust.Shared.Maths.Tests/Vector2u_Test.cs similarity index 82% rename from Robust.UnitTesting/Shared/Maths/Vector2u_Test.cs rename to Robust.Shared.Maths.Tests/Vector2u_Test.cs index 6dcee9b91..4372ccec3 100644 --- a/Robust.UnitTesting/Shared/Maths/Vector2u_Test.cs +++ b/Robust.Shared.Maths.Tests/Vector2u_Test.cs @@ -1,13 +1,12 @@ using System.Text.Json; using NUnit.Framework; -using Robust.Shared.Maths; -namespace Robust.UnitTesting.Shared.Maths +namespace Robust.Shared.Maths.Tests { [TestFixture] [Parallelizable] [TestOf(typeof(Vector2u))] - public sealed class Vector2u_Test + internal sealed class Vector2u_Test { // This test basically only exists because RSI loading needs it. [Test] diff --git a/Robust.Shared.Maths/Properties/AssemblyInfo.cs b/Robust.Shared.Maths/Properties/AssemblyInfo.cs index 7946a0d05..2503abafd 100644 --- a/Robust.Shared.Maths/Properties/AssemblyInfo.cs +++ b/Robust.Shared.Maths/Properties/AssemblyInfo.cs @@ -8,6 +8,7 @@ [assembly: InternalsVisibleTo("Robust.Server")] [assembly: InternalsVisibleTo("Robust.Client")] [assembly: InternalsVisibleTo("Robust.UnitTesting")] +[assembly: InternalsVisibleTo("Robust.Shared.Maths.Tests")] #if DEVELOPMENT [assembly: InternalsVisibleTo("Robust.Benchmarks")] diff --git a/Robust.Shared.Testing/AssemblyInfo.cs b/Robust.Shared.Testing/AssemblyInfo.cs new file mode 100644 index 000000000..f75958c78 --- /dev/null +++ b/Robust.Shared.Testing/AssemblyInfo.cs @@ -0,0 +1,4 @@ +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Robust.Server.Testing")] +[assembly: InternalsVisibleTo("Robust.UnitTesting")] diff --git a/Robust.UnitTesting/RTCVars.cs b/Robust.Shared.Testing/RTCVars.cs similarity index 92% rename from Robust.UnitTesting/RTCVars.cs rename to Robust.Shared.Testing/RTCVars.cs index 540bc52b9..d2826c8c3 100644 --- a/Robust.UnitTesting/RTCVars.cs +++ b/Robust.Shared.Testing/RTCVars.cs @@ -2,6 +2,7 @@ using Robust.Shared.Configuration; using Robust.Shared.Log; +// ReSharper disable once CheckNamespace namespace Robust.UnitTesting { // ReSharper disable once InconsistentNaming diff --git a/Robust.Shared.Testing/Robust.Shared.Testing.csproj b/Robust.Shared.Testing/Robust.Shared.Testing.csproj new file mode 100644 index 000000000..79160d007 --- /dev/null +++ b/Robust.Shared.Testing/Robust.Shared.Testing.csproj @@ -0,0 +1,20 @@ + + + + + enable + false + + + + + + + + + + + + + + diff --git a/Robust.UnitTesting/TestLogHandler.cs b/Robust.Shared.Testing/TestLogHandler.cs similarity index 97% rename from Robust.UnitTesting/TestLogHandler.cs rename to Robust.Shared.Testing/TestLogHandler.cs index f52d1ba8c..199a95e0d 100644 --- a/Robust.UnitTesting/TestLogHandler.cs +++ b/Robust.Shared.Testing/TestLogHandler.cs @@ -1,11 +1,10 @@ -using System; using System.Diagnostics; -using System.IO; using NUnit.Framework; using Robust.Shared.Configuration; using Robust.Shared.Log; using Serilog.Events; +// ReSharper disable once CheckNamespace namespace Robust.UnitTesting { public sealed class TestLogHandler : ILogHandler diff --git a/Robust.UnitTesting/TestingModLoader.cs b/Robust.Shared.Testing/TestingModLoader.cs similarity index 92% rename from Robust.UnitTesting/TestingModLoader.cs rename to Robust.Shared.Testing/TestingModLoader.cs index b03a9f432..ae605eff3 100644 --- a/Robust.UnitTesting/TestingModLoader.cs +++ b/Robust.Shared.Testing/TestingModLoader.cs @@ -1,11 +1,8 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Reflection; +using System.Reflection; using Robust.Shared.ContentPack; using Robust.Shared.Utility; -namespace Robust.UnitTesting +namespace Robust.Shared.Testing { internal sealed class TestingModLoader : BaseModLoader, IModLoaderInternal { diff --git a/Robust.UnitTesting/TestingParallelManager.cs b/Robust.Shared.Testing/TestingParallelManager.cs similarity index 92% rename from Robust.UnitTesting/TestingParallelManager.cs rename to Robust.Shared.Testing/TestingParallelManager.cs index 7d6bca7a3..e3dcda5fe 100644 --- a/Robust.UnitTesting/TestingParallelManager.cs +++ b/Robust.Shared.Testing/TestingParallelManager.cs @@ -1,13 +1,11 @@ -using System; -using System.Threading; using Robust.Shared.Threading; -namespace Robust.UnitTesting; +namespace Robust.Shared.Testing; /// /// Only allows 1 parallel process for testing purposes. /// j -public sealed class TestingParallelManager : IParallelManagerInternal +internal sealed class TestingParallelManager : IParallelManagerInternal { public event Action? ParallelCountChanged { add { } remove { } } public int ParallelProcessCount => 1; diff --git a/Robust.UnitTesting/Shared/Audio/AudioGainVolume_Test.cs b/Robust.Shared.Tests/Audio/AudioGainVolume_Test.cs similarity index 96% rename from Robust.UnitTesting/Shared/Audio/AudioGainVolume_Test.cs rename to Robust.Shared.Tests/Audio/AudioGainVolume_Test.cs index bd6a0ca3d..5932b4018 100644 --- a/Robust.UnitTesting/Shared/Audio/AudioGainVolume_Test.cs +++ b/Robust.Shared.Tests/Audio/AudioGainVolume_Test.cs @@ -2,7 +2,7 @@ using NUnit.Framework; using Robust.Shared.Audio.Systems; using Robust.Shared.Maths; -namespace Robust.UnitTesting.Shared.Audio; +namespace Robust.Shared.Tests.Audio; [TestFixture] public sealed class AudioGainVolume_Test diff --git a/Robust.UnitTesting/Shared/Collections/OverflowDictionary_Test.cs b/Robust.Shared.Tests/Collections/OverflowDictionary_Test.cs similarity index 93% rename from Robust.UnitTesting/Shared/Collections/OverflowDictionary_Test.cs rename to Robust.Shared.Tests/Collections/OverflowDictionary_Test.cs index 7d7eb7503..840761367 100644 --- a/Robust.UnitTesting/Shared/Collections/OverflowDictionary_Test.cs +++ b/Robust.Shared.Tests/Collections/OverflowDictionary_Test.cs @@ -1,14 +1,11 @@ -using System; -using System.Collections.Generic; -using System.Linq; using NUnit.Framework; using Robust.Shared.Collections; -namespace Robust.UnitTesting.Shared.Collections; +namespace Robust.Shared.Tests.Collections; [Parallelizable(ParallelScope.All | ParallelScope.Fixtures)] [TestFixture, TestOf(typeof(OverflowQueue<>))] -public sealed class OverflowDictionary_Test +internal sealed class OverflowDictionary_Test { private static IEnumerable<(int size, int iterations)> TestParams => new[] { diff --git a/Robust.UnitTesting/Shared/Collections/OverflowQueue_Test.cs b/Robust.Shared.Tests/Collections/OverflowQueue_Test.cs similarity index 91% rename from Robust.UnitTesting/Shared/Collections/OverflowQueue_Test.cs rename to Robust.Shared.Tests/Collections/OverflowQueue_Test.cs index 9a10fdc02..49e7b48c2 100644 --- a/Robust.UnitTesting/Shared/Collections/OverflowQueue_Test.cs +++ b/Robust.Shared.Tests/Collections/OverflowQueue_Test.cs @@ -1,13 +1,11 @@ -using System; -using System.Collections.Generic; using NUnit.Framework; using Robust.Shared.Collections; -namespace Robust.UnitTesting.Shared.Collections; +namespace Robust.Shared.Tests.Collections; [Parallelizable(ParallelScope.All | ParallelScope.Fixtures)] [TestFixture, TestOf(typeof(OverflowQueue<>))] -public sealed class OverflowQueue_Test +internal sealed class OverflowQueue_Test { private static IEnumerable<(int size, int iterations)> TestParams => new[] { diff --git a/Robust.UnitTesting/Shared/Collections/RingBufferListTest.cs b/Robust.Shared.Tests/Collections/RingBufferListTest.cs similarity index 76% rename from Robust.UnitTesting/Shared/Collections/RingBufferListTest.cs rename to Robust.Shared.Tests/Collections/RingBufferListTest.cs index 950bb3f24..cbb8f5464 100644 --- a/Robust.UnitTesting/Shared/Collections/RingBufferListTest.cs +++ b/Robust.Shared.Tests/Collections/RingBufferListTest.cs @@ -1,11 +1,11 @@ using NUnit.Framework; using Robust.Shared.Collections; -namespace Robust.UnitTesting.Shared.Collections; +namespace Robust.Shared.Tests.Collections; [Parallelizable(ParallelScope.All | ParallelScope.Fixtures)] [TestFixture, TestOf(typeof(RingBufferList<>))] -public sealed class RingBufferListTest +internal sealed class RingBufferListTest { [Test] public void TestBasicAdd() @@ -15,7 +15,7 @@ public sealed class RingBufferListTest list.Add(2); list.Add(3); - Assert.That(list, NUnit.Framework.Is.EquivalentTo(new[] {1, 2, 3})); + Assert.That(list, Is.EquivalentTo(new[] {1, 2, 3})); } [Test] @@ -34,8 +34,8 @@ public sealed class RingBufferListTest { // Ensure wrapping properly happened and we didn't expand. // (one slot is wasted by nature of implementation) - Assert.That(list.Capacity, NUnit.Framework.Is.EqualTo(6)); - Assert.That(list, NUnit.Framework.Is.EquivalentTo(new[] { 2, 3, 4, 5, 6 })); + Assert.That(list.Capacity, Is.EqualTo(6)); + Assert.That(list, Is.EquivalentTo(new[] { 2, 3, 4, 5, 6 })); }); } @@ -58,7 +58,7 @@ public sealed class RingBufferListTest list.Add(5); list.Remove(4); - Assert.That(list, NUnit.Framework.Is.EquivalentTo(new[] {1, 2, 3, 5})); + Assert.That(list, Is.EquivalentTo(new[] {1, 2, 3, 5})); } [Test] @@ -76,7 +76,7 @@ public sealed class RingBufferListTest list.Add(5); list.Remove(3); - Assert.That(list, NUnit.Framework.Is.EquivalentTo(new[] {1, 2, 4, 5})); + Assert.That(list, Is.EquivalentTo(new[] {1, 2, 4, 5})); } [Test] @@ -90,6 +90,6 @@ public sealed class RingBufferListTest list.Add(5); list.Remove(4); - Assert.That(list, NUnit.Framework.Is.EquivalentTo(new[] {1, 2, 3, 5})); + Assert.That(list, Is.EquivalentTo(new[] {1, 2, 3, 5})); } } diff --git a/Robust.UnitTesting/Shared/ContentPack/AssemblyTypeCheckerParsingTest.cs b/Robust.Shared.Tests/ContentPack/AssemblyTypeCheckerParsingTest.cs similarity index 96% rename from Robust.UnitTesting/Shared/ContentPack/AssemblyTypeCheckerParsingTest.cs rename to Robust.Shared.Tests/ContentPack/AssemblyTypeCheckerParsingTest.cs index 9ef5a4ad2..a892924cc 100644 --- a/Robust.UnitTesting/Shared/ContentPack/AssemblyTypeCheckerParsingTest.cs +++ b/Robust.Shared.Tests/ContentPack/AssemblyTypeCheckerParsingTest.cs @@ -4,11 +4,11 @@ using NUnit.Framework; using Pidgin; using static Robust.Shared.ContentPack.AssemblyTypeChecker; -namespace Robust.UnitTesting.Shared.ContentPack +namespace Robust.Shared.Tests.ContentPack { [Parallelizable(ParallelScope.All)] [TestFixture] - public sealed class AssemblyTypeCheckerParsingTest + internal sealed class AssemblyTypeCheckerParsingTest { [Test] public void TestMethod() diff --git a/Robust.UnitTesting/Shared/ContentPack/ResourceManagerTest2.cs b/Robust.Shared.Tests/ContentPack/ResourceManagerTest2.cs similarity index 96% rename from Robust.UnitTesting/Shared/ContentPack/ResourceManagerTest2.cs rename to Robust.Shared.Tests/ContentPack/ResourceManagerTest2.cs index 3e4faceba..96ca1a306 100644 --- a/Robust.UnitTesting/Shared/ContentPack/ResourceManagerTest2.cs +++ b/Robust.Shared.Tests/ContentPack/ResourceManagerTest2.cs @@ -1,5 +1,4 @@ -using System; -using NUnit.Framework; +using NUnit.Framework; using Robust.Shared.Configuration; using Robust.Shared.ContentPack; using Robust.Shared.IoC; @@ -7,12 +6,12 @@ using Robust.Shared.Log; using Robust.Shared.Timing; using Robust.Shared.Utility; -namespace Robust.UnitTesting.Shared.ContentPack; +namespace Robust.Shared.Tests.ContentPack; [TestFixture] [TestOf(typeof(ResourceManager))] [Parallelizable(ParallelScope.All)] -public sealed class ResourceManagerTest2 +internal sealed class ResourceManagerTest2 { [Test] public void TestMemoryRootReadFiles() diff --git a/Robust.UnitTesting/Shared/IoC/DependencyCollectionTest.cs b/Robust.Shared.Tests/IoC/DependencyCollectionTest.cs similarity index 95% rename from Robust.UnitTesting/Shared/IoC/DependencyCollectionTest.cs rename to Robust.Shared.Tests/IoC/DependencyCollectionTest.cs index 503413426..cb2f340e0 100644 --- a/Robust.UnitTesting/Shared/IoC/DependencyCollectionTest.cs +++ b/Robust.Shared.Tests/IoC/DependencyCollectionTest.cs @@ -1,7 +1,7 @@ using NUnit.Framework; using Robust.Shared.IoC; -namespace Robust.UnitTesting.Shared.IoC; +namespace Robust.Shared.Tests.IoC; [TestFixture] [TestOf(typeof(DependencyCollection))] diff --git a/Robust.UnitTesting/Shared/IoC/IoCManager_Test.cs b/Robust.Shared.Tests/IoC/IoCManager_Test.cs similarity index 99% rename from Robust.UnitTesting/Shared/IoC/IoCManager_Test.cs rename to Robust.Shared.Tests/IoC/IoCManager_Test.cs index f56cce14a..5b3d9684e 100644 --- a/Robust.UnitTesting/Shared/IoC/IoCManager_Test.cs +++ b/Robust.Shared.Tests/IoC/IoCManager_Test.cs @@ -1,17 +1,16 @@ -using System; using Moq; using NUnit.Framework; using Robust.Shared.Analyzers; using Robust.Shared.IoC; using Robust.Shared.IoC.Exceptions; -namespace Robust.UnitTesting.Shared.IoC +namespace Robust.Shared.Tests.IoC { /// /// This fixture CAN NOT be parallelized, because is a static singleton. /// [TestFixture, TestOf(typeof(IoCManager))] - public sealed class IoCManager_Test + internal sealed class IoCManager_Test { [OneTimeSetUp] public void OneTimeSetup() diff --git a/Robust.UnitTesting/Shared/Localization/FormatErrorTest.cs b/Robust.Shared.Tests/Localization/FormatErrorTest.cs similarity index 93% rename from Robust.UnitTesting/Shared/Localization/FormatErrorTest.cs rename to Robust.Shared.Tests/Localization/FormatErrorTest.cs index 99a6b318a..6cec78b17 100644 --- a/Robust.UnitTesting/Shared/Localization/FormatErrorTest.cs +++ b/Robust.Shared.Tests/Localization/FormatErrorTest.cs @@ -1,13 +1,12 @@ -using System; -using Linguini.Syntax.Parser.Error; +using Linguini.Syntax.Parser.Error; using NUnit.Framework; using Robust.Shared.Localization; -namespace Robust.UnitTesting.Shared.Localization; +namespace Robust.Shared.Tests.Localization; [TestFixture] [Parallelizable] -public sealed class TestFormatErrors +internal sealed class TestFormatErrors { // Error spans a single line private const string ResSingle = "err1 = $user)"; diff --git a/Robust.UnitTesting/Shared/Map/MapBitmask_Tests.cs b/Robust.Shared.Tests/Map/MapBitmask_Tests.cs similarity index 86% rename from Robust.UnitTesting/Shared/Map/MapBitmask_Tests.cs rename to Robust.Shared.Tests/Map/MapBitmask_Tests.cs index 20e67d6e1..941ea3541 100644 --- a/Robust.UnitTesting/Shared/Map/MapBitmask_Tests.cs +++ b/Robust.Shared.Tests/Map/MapBitmask_Tests.cs @@ -1,12 +1,11 @@ -using System.Numerics; using NUnit.Framework; using Robust.Shared.GameObjects; using Robust.Shared.Maths; -namespace Robust.UnitTesting.Shared.Map; +namespace Robust.Shared.Tests.Map; [TestFixture] -public sealed class MapBitmask_Tests +internal sealed class MapBitmask_Tests { private static readonly TestCaseData[] Cases = new[] { diff --git a/Robust.UnitTesting/Shared/Networking/NetDisconnectMessageTest.cs b/Robust.Shared.Tests/Networking/NetDisconnectMessageTest.cs similarity index 98% rename from Robust.UnitTesting/Shared/Networking/NetDisconnectMessageTest.cs rename to Robust.Shared.Tests/Networking/NetDisconnectMessageTest.cs index 0e55e8d0f..61a35797d 100644 --- a/Robust.UnitTesting/Shared/Networking/NetDisconnectMessageTest.cs +++ b/Robust.Shared.Tests/Networking/NetDisconnectMessageTest.cs @@ -1,7 +1,7 @@ using NUnit.Framework; using Robust.Shared.Network; -namespace Robust.UnitTesting.Shared.Networking; +namespace Robust.Shared.Tests.Networking; [TestFixture] [Parallelizable(ParallelScope.All)] diff --git a/Robust.UnitTesting/Shared/Physics/B2DynamicTree_Test.cs b/Robust.Shared.Tests/Physics/B2DynamicTree_Test.cs similarity index 94% rename from Robust.UnitTesting/Shared/Physics/B2DynamicTree_Test.cs rename to Robust.Shared.Tests/Physics/B2DynamicTree_Test.cs index 5a26d4c04..c632cb87d 100644 --- a/Robust.UnitTesting/Shared/Physics/B2DynamicTree_Test.cs +++ b/Robust.Shared.Tests/Physics/B2DynamicTree_Test.cs @@ -1,14 +1,13 @@ -using System.Collections.Generic; using System.Numerics; using NUnit.Framework; using Robust.Shared.Maths; using Robust.Shared.Physics; -namespace Robust.UnitTesting.Shared.Physics +namespace Robust.Shared.Tests.Physics { [TestFixture] [TestOf(typeof(B2DynamicTree<>))] - public sealed class B2DynamicTree_Test + internal sealed class B2DynamicTree_Test { private static Box2[] aabbs1 = { diff --git a/Robust.UnitTesting/Shared/Physics/DynamicTree_Test.cs b/Robust.Shared.Tests/Physics/DynamicTree_Test.cs similarity index 98% rename from Robust.UnitTesting/Shared/Physics/DynamicTree_Test.cs rename to Robust.Shared.Tests/Physics/DynamicTree_Test.cs index 85510939c..e73458a8f 100644 --- a/Robust.UnitTesting/Shared/Physics/DynamicTree_Test.cs +++ b/Robust.Shared.Tests/Physics/DynamicTree_Test.cs @@ -1,16 +1,14 @@ -using System; -using System.Linq; using System.Numerics; using NUnit.Framework; using Robust.Shared.Maths; using Robust.Shared.Physics; -namespace Robust.UnitTesting.Shared.Physics +namespace Robust.Shared.Tests.Physics { [TestFixture] [TestOf(typeof(DynamicTree<>))] - public sealed class DynamicTree_Test + internal sealed class DynamicTree_Test { private static Box2[] aabbs1 = diff --git a/Robust.UnitTesting/Shared/Physics/Shapes/SlimPolygonTest.cs b/Robust.Shared.Tests/Physics/Shapes/SlimPolygonTest.cs similarity index 97% rename from Robust.UnitTesting/Shared/Physics/Shapes/SlimPolygonTest.cs rename to Robust.Shared.Tests/Physics/Shapes/SlimPolygonTest.cs index aaf0606b7..34f940515 100644 --- a/Robust.UnitTesting/Shared/Physics/Shapes/SlimPolygonTest.cs +++ b/Robust.Shared.Tests/Physics/Shapes/SlimPolygonTest.cs @@ -1,13 +1,12 @@ -using System; -using System.Collections.Generic; using System.Numerics; using NUnit.Framework; using Robust.Shared.Maths; +using Robust.Shared.Maths.Tests; using Robust.Shared.Physics; using Robust.Shared.Physics.Shapes; -using Robust.UnitTesting.Shared.Maths; +using Robust.UnitTesting; -namespace Robust.UnitTesting.Shared.Physics.Shapes; +namespace Robust.Shared.Tests.Physics.Shapes; [TestFixture] [TestOf(typeof(SlimPolygon))] diff --git a/Robust.UnitTesting/Shared/Prototypes/MultiRootGraphTest.cs b/Robust.Shared.Tests/Prototypes/MultiRootGraphTest.cs similarity index 95% rename from Robust.UnitTesting/Shared/Prototypes/MultiRootGraphTest.cs rename to Robust.Shared.Tests/Prototypes/MultiRootGraphTest.cs index 8344f276e..6b166694b 100644 --- a/Robust.UnitTesting/Shared/Prototypes/MultiRootGraphTest.cs +++ b/Robust.Shared.Tests/Prototypes/MultiRootGraphTest.cs @@ -1,12 +1,10 @@ -using System; -using System.Linq; -using NUnit.Framework; +using NUnit.Framework; using Robust.Shared.Prototypes; -namespace Robust.UnitTesting.Shared.Prototypes; +namespace Robust.Shared.Tests.Prototypes; [TestFixture] -public sealed class MultiRootGraphTest +internal sealed class MultiRootGraphTest { private const string Id1 = "id1"; private const string Id2 = "id2"; diff --git a/Robust.UnitTesting/Shared/Random/RandomExtensionsTests.cs b/Robust.Shared.Tests/Random/RandomExtensionsTests.cs similarity index 95% rename from Robust.UnitTesting/Shared/Random/RandomExtensionsTests.cs rename to Robust.Shared.Tests/Random/RandomExtensionsTests.cs index a93bb274c..96b561d14 100644 --- a/Robust.UnitTesting/Shared/Random/RandomExtensionsTests.cs +++ b/Robust.Shared.Tests/Random/RandomExtensionsTests.cs @@ -1,16 +1,13 @@ -using System; -using System.Collections.Generic; -using System.Linq; using Moq; using NUnit.Framework; using Robust.Shared.Collections; using Robust.Shared.Random; -namespace Robust.UnitTesting.Shared.Random; +namespace Robust.Shared.Tests.Random; /// Instantiable tests for . [TestFixture] -public sealed class RandomExtensionsGetItemsWithListTests : RandomExtensionsTests> +internal sealed class RandomExtensionsGetItemsWithListTests : RandomExtensionsTests> { /// protected override IList CreateCollection() @@ -23,7 +20,7 @@ public sealed class RandomExtensionsGetItemsWithListTests : RandomExtensionsTest /// Instantiable tests for . [TestFixture] -public sealed class RandomExtensionsGetItemsWithSpanTests : RandomExtensionsTests +internal sealed class RandomExtensionsGetItemsWithSpanTests : RandomExtensionsTests { /// protected override string[] CreateCollection() @@ -40,7 +37,7 @@ public sealed class RandomExtensionsGetItemsWithSpanTests : RandomExtensionsTest /// Instantiable tests for . [TestFixture] -public sealed class RandomExtensionsGetItemsWithValueListTests : RandomExtensionsTests> +internal sealed class RandomExtensionsGetItemsWithValueListTests : RandomExtensionsTests> { /// protected override ValueList CreateCollection() @@ -53,7 +50,7 @@ public sealed class RandomExtensionsGetItemsWithValueListTests : RandomExtension } [TestFixture] -public abstract class RandomExtensionsTests +internal abstract class RandomExtensionsTests { protected IRobustRandom _underlyingRandom = default!; diff --git a/Robust.UnitTesting/Shared/Resources/WritableDirProviderTest.cs b/Robust.Shared.Tests/Resources/WritableDirProviderTest.cs similarity index 92% rename from Robust.UnitTesting/Shared/Resources/WritableDirProviderTest.cs rename to Robust.Shared.Tests/Resources/WritableDirProviderTest.cs index 37fba8caa..892836231 100644 --- a/Robust.UnitTesting/Shared/Resources/WritableDirProviderTest.cs +++ b/Robust.Shared.Tests/Resources/WritableDirProviderTest.cs @@ -1,14 +1,12 @@ -using System; -using System.IO; -using NUnit.Framework; +using NUnit.Framework; using Robust.Shared.ContentPack; using Robust.Shared.Utility; -namespace Robust.UnitTesting.Shared.Resources +namespace Robust.Shared.Tests.Resources { [TestFixture] [TestOf(typeof(WritableDirProvider))] - public sealed class WritableDirProviderTest + internal sealed class WritableDirProviderTest { private string _testDirPath = default!; private DirectoryInfo _testDir = default!; diff --git a/Robust.UnitTesting/Shared/RichText/FormattedStringTest.cs b/Robust.Shared.Tests/RichText/FormattedStringTest.cs similarity index 100% rename from Robust.UnitTesting/Shared/RichText/FormattedStringTest.cs rename to Robust.Shared.Tests/RichText/FormattedStringTest.cs diff --git a/Robust.Shared.Tests/Robust.Shared.Tests.csproj b/Robust.Shared.Tests/Robust.Shared.Tests.csproj new file mode 100644 index 000000000..2cf2a4a10 --- /dev/null +++ b/Robust.Shared.Tests/Robust.Shared.Tests.csproj @@ -0,0 +1,25 @@ + + + + + enable + + + + + + + + + + + + + + + + + + + + diff --git a/Robust.UnitTesting/Shared/Serialization/NetSerializerBitArrayTest.cs b/Robust.Shared.Tests/Serialization/NetSerializerBitArrayTest.cs similarity index 96% rename from Robust.UnitTesting/Shared/Serialization/NetSerializerBitArrayTest.cs rename to Robust.Shared.Tests/Serialization/NetSerializerBitArrayTest.cs index 95b53fd55..7e2ea35be 100644 --- a/Robust.UnitTesting/Shared/Serialization/NetSerializerBitArrayTest.cs +++ b/Robust.Shared.Tests/Serialization/NetSerializerBitArrayTest.cs @@ -1,12 +1,10 @@ -using System; -using System.Collections; -using System.IO; +using System.Collections; using System.Text; using NetSerializer; using NUnit.Framework; using Robust.Shared.Serialization; -namespace Robust.UnitTesting.Shared.Serialization; +namespace Robust.Shared.Tests.Serialization; [Parallelizable(ParallelScope.All)] [TestFixture, TestOf(typeof(NetBitArraySerializer))] diff --git a/Robust.UnitTesting/Shared/Serialization/NetSerializerFormattedStringTest.cs b/Robust.Shared.Tests/Serialization/NetSerializerFormattedStringTest.cs similarity index 95% rename from Robust.UnitTesting/Shared/Serialization/NetSerializerFormattedStringTest.cs rename to Robust.Shared.Tests/Serialization/NetSerializerFormattedStringTest.cs index 193de43db..28d9cccca 100644 --- a/Robust.UnitTesting/Shared/Serialization/NetSerializerFormattedStringTest.cs +++ b/Robust.Shared.Tests/Serialization/NetSerializerFormattedStringTest.cs @@ -1,10 +1,9 @@ -using System.IO; -using NetSerializer; +using NetSerializer; using NUnit.Framework; using Robust.Shared.RichText; using Robust.Shared.Serialization; -namespace Robust.UnitTesting.Shared.Serialization; +namespace Robust.Shared.Tests.Serialization; [Parallelizable(ParallelScope.All)] [TestFixture, TestOf(typeof(NetFormattedStringSerializer))] diff --git a/Robust.UnitTesting/Shared/Timing/GameTiming_Test.cs b/Robust.Shared.Tests/Timing/GameTiming_Test.cs similarity index 98% rename from Robust.UnitTesting/Shared/Timing/GameTiming_Test.cs rename to Robust.Shared.Tests/Timing/GameTiming_Test.cs index 735fa6dd0..1391a69c1 100644 --- a/Robust.UnitTesting/Shared/Timing/GameTiming_Test.cs +++ b/Robust.Shared.Tests/Timing/GameTiming_Test.cs @@ -1,14 +1,13 @@ -using System; -using System.Reflection; +using System.Reflection; using Moq; using NUnit.Framework; using Robust.Shared.Timing; -namespace Robust.UnitTesting.Shared.Timing +namespace Robust.Shared.Tests.Timing { [TestFixture] [TestOf(typeof(GameTiming))] - sealed class GameTiming_Test + internal sealed class GameTiming_Test { /// /// Checks that IGameTiming.RealTime returns the real(wall) uptime since the stopwatch was started. diff --git a/Robust.UnitTesting/Shared/Utility/CaseConversionTest.cs b/Robust.Shared.Tests/Utility/CaseConversionTest.cs similarity index 89% rename from Robust.UnitTesting/Shared/Utility/CaseConversionTest.cs rename to Robust.Shared.Tests/Utility/CaseConversionTest.cs index 7ec501d21..56b97964b 100644 --- a/Robust.UnitTesting/Shared/Utility/CaseConversionTest.cs +++ b/Robust.Shared.Tests/Utility/CaseConversionTest.cs @@ -1,12 +1,12 @@ using NUnit.Framework; using Robust.Shared.Utility; -namespace Robust.UnitTesting.Shared.Utility +namespace Robust.Shared.Tests.Utility { [Parallelizable(ParallelScope.All)] [TestFixture] [TestOf(typeof(CaseConversion))] - public sealed class CaseConversionTest + internal sealed class CaseConversionTest { [Test] [TestCase("FooBar", ExpectedResult = "foo-bar")] diff --git a/Robust.UnitTesting/Shared/Utility/CollectionExtensions_Test.cs b/Robust.Shared.Tests/Utility/CollectionExtensions_Test.cs similarity index 85% rename from Robust.UnitTesting/Shared/Utility/CollectionExtensions_Test.cs rename to Robust.Shared.Tests/Utility/CollectionExtensions_Test.cs index c95265cf5..eeabd0c76 100644 --- a/Robust.UnitTesting/Shared/Utility/CollectionExtensions_Test.cs +++ b/Robust.Shared.Tests/Utility/CollectionExtensions_Test.cs @@ -1,13 +1,11 @@ -using System.Collections.Generic; -using System.Linq; -using NUnit.Framework; +using NUnit.Framework; using Robust.Shared.Utility; -namespace Robust.UnitTesting.Shared.Utility +namespace Robust.Shared.Tests.Utility { [Parallelizable(ParallelScope.All | ParallelScope.Fixtures)] [TestFixture] - public sealed class CollectionExtensions_Test + internal sealed class CollectionExtensions_Test { [Test] public void RemoveSwapTest() diff --git a/Robust.UnitTesting/Shared/Utility/CommandParsing_Test.cs b/Robust.Shared.Tests/Utility/CommandParsing_Test.cs similarity index 90% rename from Robust.UnitTesting/Shared/Utility/CommandParsing_Test.cs rename to Robust.Shared.Tests/Utility/CommandParsing_Test.cs index 9524ee6a0..b99089f2b 100644 --- a/Robust.UnitTesting/Shared/Utility/CommandParsing_Test.cs +++ b/Robust.Shared.Tests/Utility/CommandParsing_Test.cs @@ -1,13 +1,12 @@ -using System.Collections.Generic; using NUnit.Framework; using Robust.Shared.Utility; -namespace Robust.UnitTesting.Shared.Utility +namespace Robust.Shared.Tests.Utility { [Parallelizable(ParallelScope.All | ParallelScope.Fixtures)] [TestFixture] [TestOf(typeof(CommandParsing))] - public sealed class CommandParsing_Test + internal sealed class CommandParsing_Test { [TestCase("foo bar", new[] {"foo", "bar"})] [TestCase("foo bar", new[] {"foo", "bar"})] diff --git a/Robust.UnitTesting/Shared/Utility/FormattedMessage_Test.cs b/Robust.Shared.Tests/Utility/FormattedMessage_Test.cs similarity index 96% rename from Robust.UnitTesting/Shared/Utility/FormattedMessage_Test.cs rename to Robust.Shared.Tests/Utility/FormattedMessage_Test.cs index da7d5c970..56df9f21c 100644 --- a/Robust.UnitTesting/Shared/Utility/FormattedMessage_Test.cs +++ b/Robust.Shared.Tests/Utility/FormattedMessage_Test.cs @@ -1,14 +1,13 @@ -using System.Linq; using NUnit.Framework; using Robust.Shared.Maths; using Robust.Shared.Utility; -namespace Robust.UnitTesting.Shared.Utility +namespace Robust.Shared.Tests.Utility { [Parallelizable(ParallelScope.All)] [TestFixture] [TestOf(typeof(FormattedMessage))] - public sealed class FormattedMessage_Test + internal sealed class FormattedMessage_Test { [Test] public static void TestParseMarkup() diff --git a/Robust.UnitTesting/Shared/Utility/MarkupNodeTest.cs b/Robust.Shared.Tests/Utility/MarkupNodeTest.cs similarity index 94% rename from Robust.UnitTesting/Shared/Utility/MarkupNodeTest.cs rename to Robust.Shared.Tests/Utility/MarkupNodeTest.cs index b65ea186c..d7c8aa1c6 100644 --- a/Robust.UnitTesting/Shared/Utility/MarkupNodeTest.cs +++ b/Robust.Shared.Tests/Utility/MarkupNodeTest.cs @@ -1,16 +1,14 @@ -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq; +using System.Diagnostics.CodeAnalysis; using NUnit.Framework; using Robust.Shared.Maths; using Robust.Shared.Utility; -namespace Robust.UnitTesting.Shared.Utility; +namespace Robust.Shared.Tests.Utility; [TestFixture] [Parallelizable(ParallelScope.All)] [TestOf(typeof(MarkupNode))] -public sealed class MarkupNodeTest +internal sealed class MarkupNodeTest { [Test] [SuppressMessage("Assertion", "NUnit2009:The same value has been provided as both the actual and the expected argument")] diff --git a/Robust.UnitTesting/Shared/Utility/MathHelper_Test.cs b/Robust.Shared.Tests/Utility/MathHelper_Test.cs similarity index 98% rename from Robust.UnitTesting/Shared/Utility/MathHelper_Test.cs rename to Robust.Shared.Tests/Utility/MathHelper_Test.cs index a95c642d6..258275d5d 100644 --- a/Robust.UnitTesting/Shared/Utility/MathHelper_Test.cs +++ b/Robust.Shared.Tests/Utility/MathHelper_Test.cs @@ -1,14 +1,12 @@ -using System; -using System.Collections.Generic; -using System.Numerics; +using System.Numerics; using NUnit.Framework; using Robust.Shared.Maths; -namespace Robust.UnitTesting.Shared.Utility +namespace Robust.Shared.Tests.Utility { [TestFixture, Parallelizable] [TestOf(typeof(MathHelper))] - public sealed class MathHelper_Test + internal sealed class MathHelper_Test { public static IEnumerable<(long val, long result)> LongNextPowerOfTwoData = new (long, long)[] { diff --git a/Robust.UnitTesting/Shared/Utility/NullableHelper_Test.cs b/Robust.Shared.Tests/Utility/NullableHelper_Test.cs similarity index 96% rename from Robust.UnitTesting/Shared/Utility/NullableHelper_Test.cs rename to Robust.Shared.Tests/Utility/NullableHelper_Test.cs index 6fd267266..2a11dd903 100644 --- a/Robust.UnitTesting/Shared/Utility/NullableHelper_Test.cs +++ b/Robust.Shared.Tests/Utility/NullableHelper_Test.cs @@ -3,11 +3,11 @@ using Robust.Shared.IoC; using Robust.Shared.Log; using Robust.Shared.Utility; -namespace Robust.UnitTesting.Shared.Utility +namespace Robust.Shared.Tests.Utility { [TestFixture] [TestOf(typeof(NullableHelper))] - public sealed class NullableHelper_Test + internal sealed class NullableHelper_Test { [SetUp] public void Setup() diff --git a/Robust.Shared.Tests/Utility/PrettyPrint_Test.cs b/Robust.Shared.Tests/Utility/PrettyPrint_Test.cs new file mode 100644 index 000000000..086163aae --- /dev/null +++ b/Robust.Shared.Tests/Utility/PrettyPrint_Test.cs @@ -0,0 +1,31 @@ +using NUnit.Framework; +using Robust.Shared.Utility; + +// ReSharper disable once CheckNamespace +namespace Robust.Shared.TestPrettyPrint; + +public sealed class Foo +{ + override public string ToString() { return "ACustomFooRep"; } +} + +public sealed class Bar {} + +[TestFixture] +[Parallelizable(ParallelScope.Fixtures | ParallelScope.All)] +[TestOf(typeof(PrettyPrint))] +internal sealed class PrettyPrint_Test +{ + private static IEnumerable<(object val, string expectedRep, string expectedTypeRep)> TestCases { get; } = new (object, string, string)[] + { + (new Foo(), "ACustomFooRep", "R.Sh.TestPrettyPrint.Foo"), + (new Robust.Shared.TestPrettyPrint.Bar(), "R.Sh.TestPrettyPrint.Bar", ""), + }; + + [Test] + public void Test([ValueSource(nameof(TestCases))] (object value, string expectedRep, string expectedTypeRep) data) + { + Assert.That(PrettyPrint.PrintUserFacingWithType(data.value, out var typeRep), Is.EqualTo(data.expectedRep)); + Assert.That(typeRep, Is.EqualTo(data.expectedTypeRep)); + } +} diff --git a/Robust.UnitTesting/Shared/Utility/ResPathTest.cs b/Robust.Shared.Tests/Utility/ResPathTest.cs similarity index 98% rename from Robust.UnitTesting/Shared/Utility/ResPathTest.cs rename to Robust.Shared.Tests/Utility/ResPathTest.cs index d4a84fedc..bb46211fc 100644 --- a/Robust.UnitTesting/Shared/Utility/ResPathTest.cs +++ b/Robust.Shared.Tests/Utility/ResPathTest.cs @@ -1,13 +1,12 @@ -using System; -using NUnit.Framework; +using NUnit.Framework; using Robust.Shared.Utility; -namespace Robust.UnitTesting.Shared.Utility; +namespace Robust.Shared.Tests.Utility; [TestFixture] [Parallelizable(ParallelScope.Fixtures | ParallelScope.All)] [TestOf(typeof(ResPath))] -public sealed class ResPathTest +internal sealed class ResPathTest { [Test] [TestCase("foo", ExpectedResult = "")] diff --git a/Robust.UnitTesting/Shared/Utility/TextRope_Test.cs b/Robust.Shared.Tests/Utility/TextRope_Test.cs similarity index 96% rename from Robust.UnitTesting/Shared/Utility/TextRope_Test.cs rename to Robust.Shared.Tests/Utility/TextRope_Test.cs index 1902ddd5e..8ced388f1 100644 --- a/Robust.UnitTesting/Shared/Utility/TextRope_Test.cs +++ b/Robust.Shared.Tests/Utility/TextRope_Test.cs @@ -1,14 +1,12 @@ -using System.Diagnostics.CodeAnalysis; -using System.Linq; -using NUnit.Framework; +using NUnit.Framework; using Robust.Shared.Utility; -namespace Robust.UnitTesting.Shared.Utility; +namespace Robust.Shared.Tests.Utility; [TestFixture] [TestOf(typeof(Rope))] [Parallelizable(ParallelScope.All)] -public static class TextRope_Test +internal static class TextRope_Test { [Test] public static void TestCalcWeight() diff --git a/Robust.Shared.Tests/Utility/TypeAbbreviations_Test.cs b/Robust.Shared.Tests/Utility/TypeAbbreviations_Test.cs new file mode 100644 index 000000000..70417e558 --- /dev/null +++ b/Robust.Shared.Tests/Utility/TypeAbbreviations_Test.cs @@ -0,0 +1,46 @@ +using NUnit.Framework; +using Robust.Shared.Utility; + +// ReSharper disable once CheckNamespace +namespace Robust.Shared.TestTypeAbbreviation; + +public sealed class Foo {} + +public sealed class Bar {} + +[TestFixture] +[Parallelizable(ParallelScope.Fixtures | ParallelScope.All)] +[TestOf(typeof(TypeAbbreviation))] +public sealed class TypeAbbreviations_Test +{ + private static IEnumerable<(string name, string expected)> NameTestCases { get; } = new[] + { + ("Robust.Shared.GameObjects.Foo", "R.Sh.GO.Foo"), + ("Robust.Client.GameObjects.Foo", "R.C.GO.Foo"), + ("Content.Client.GameObjects.Foo", "C.C.GO.Foo"), + ("Robust.Shared.Maths.Vector2", "R.Sh.M.Vector2"), + ("System.Collections.Generic.List", "S.C.G.List"), + ("System.Math", "S.Math"), + }; + + [Test] + public void Test([ValueSource(nameof(NameTestCases))] (string name, string expected) data) + { + Assert.That(TypeAbbreviation.Abbreviate(data.name), Is.EqualTo(data.expected)); + } + + + private static IEnumerable<(Type type, string expected)> TypeTestCases { get; } = new[] + { + ( typeof(Robust.Shared.TestTypeAbbreviation.Foo) + , "R.Sh.TestTypeAbbreviation.Foo`1[R.Sh.TestTypeAbbreviation.Bar]" + ), + (typeof(Robust.Shared.TestTypeAbbreviation.Bar), "R.Sh.TestTypeAbbreviation.Bar"), + }; + + [Test] + public void Test([ValueSource(nameof(TypeTestCases))] (Type type, string expected) data) + { + Assert.That(TypeAbbreviation.Abbreviate(data.type), Is.EqualTo(data.expected)); + } +} diff --git a/Robust.UnitTesting/Shared/Utility/TypeHelpers_Test.cs b/Robust.Shared.Tests/Utility/TypeHelpers_Test.cs similarity index 94% rename from Robust.UnitTesting/Shared/Utility/TypeHelpers_Test.cs rename to Robust.Shared.Tests/Utility/TypeHelpers_Test.cs index 2842259a3..f0e8d6cba 100644 --- a/Robust.UnitTesting/Shared/Utility/TypeHelpers_Test.cs +++ b/Robust.Shared.Tests/Utility/TypeHelpers_Test.cs @@ -1,8 +1,9 @@ using System.Diagnostics.CodeAnalysis; using NUnit.Framework; +using Robust.Shared.Analyzers; using Robust.Shared.Utility; -namespace Robust.UnitTesting.Shared.Utility +namespace Robust.Shared.Tests.Utility { [TestFixture] [TestOf(typeof(TypeHelpers))] diff --git a/Robust.UnitTesting/Shared/Utility/YamlHelpers_Test.cs b/Robust.Shared.Tests/Utility/YamlHelpers_Test.cs similarity index 84% rename from Robust.UnitTesting/Shared/Utility/YamlHelpers_Test.cs rename to Robust.Shared.Tests/Utility/YamlHelpers_Test.cs index 83141059d..d4b8c6610 100644 --- a/Robust.UnitTesting/Shared/Utility/YamlHelpers_Test.cs +++ b/Robust.Shared.Tests/Utility/YamlHelpers_Test.cs @@ -1,14 +1,13 @@ -using System; -using System.Globalization; +using System.Globalization; using NUnit.Framework; using Robust.Shared.Utility; using YamlDotNet.RepresentationModel; -namespace Robust.UnitTesting.Shared.Utility +namespace Robust.Shared.Tests.Utility { [Parallelizable(ParallelScope.All | ParallelScope.Fixtures)] [TestFixture] - public sealed class YamlHelpers_Test : RobustUnitTest + public sealed class YamlHelpers_Test { [Test] [SetCulture("fr-FR")] diff --git a/Robust.Shared/AssemblyInfo.cs b/Robust.Shared/AssemblyInfo.cs index 2154102ed..1120f96dd 100644 --- a/Robust.Shared/AssemblyInfo.cs +++ b/Robust.Shared/AssemblyInfo.cs @@ -12,6 +12,12 @@ [assembly: InternalsVisibleTo("Robust.Benchmarks")] [assembly: InternalsVisibleTo("Robust.Client.WebView")] [assembly: InternalsVisibleTo("Robust.Packaging")] +[assembly: InternalsVisibleTo("Robust.Shared.Tests")] +[assembly: InternalsVisibleTo("Robust.Server.IntegrationTests")] +[assembly: InternalsVisibleTo("Robust.Server.Testing")] +[assembly: InternalsVisibleTo("Robust.Shared.Testing")] +[assembly: InternalsVisibleTo("Robust.Client.IntegrationTests")] +[assembly: InternalsVisibleTo("Robust.Shared.IntegrationTests")] #if NET5_0_OR_GREATER [module: SkipLocalsInit] diff --git a/Robust.Shared/Reflection/ReflectionManager.cs b/Robust.Shared/Reflection/ReflectionManager.cs index a6cff5d6b..112ca726b 100644 --- a/Robust.Shared/Reflection/ReflectionManager.cs +++ b/Robust.Shared/Reflection/ReflectionManager.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Reflection; @@ -107,7 +108,11 @@ namespace Robust.Shared.Reflection public void LoadAssemblies(IEnumerable assemblies) { - this.assemblies.AddRange(assemblies); + var assembliesArray = assemblies.Distinct().ToArray(); + if (this.assemblies.Intersect(assembliesArray).Any()) + throw new InvalidOperationException("Attempted to load the same assembly multiple times!"); + + this.assemblies.AddRange(assembliesArray); _getAllTypesCache.Clear(); OnAssemblyAdded?.Invoke(this, new ReflectionUpdateEventArgs(this)); } diff --git a/Robust.UnitTesting/AssemblyInfo.cs b/Robust.UnitTesting/AssemblyInfo.cs index fc728beff..5ca3b49f6 100644 --- a/Robust.UnitTesting/AssemblyInfo.cs +++ b/Robust.UnitTesting/AssemblyInfo.cs @@ -3,5 +3,7 @@ using NUnit.Framework; // So it can use RobustServerSimulation. [assembly: InternalsVisibleTo("Robust.Benchmarks")] +[assembly: InternalsVisibleTo("Robust.Server.IntegrationTests")] +[assembly: InternalsVisibleTo("Robust.Shared.IntegrationTests")] [assembly: Parallelizable(ParallelScope.Fixtures)] diff --git a/Robust.UnitTesting/Helpers.cs b/Robust.UnitTesting/Helpers.cs index 99412c92a..1b3b79f5e 100644 --- a/Robust.UnitTesting/Helpers.cs +++ b/Robust.UnitTesting/Helpers.cs @@ -2,7 +2,6 @@ using System; using System.IO; using System.Text; using Robust.Shared.ContentPack; -using Robust.Shared.Utility; namespace Robust.UnitTesting { diff --git a/Robust.UnitTesting/Robust.UnitTesting.csproj b/Robust.UnitTesting/Robust.UnitTesting.csproj index c14f58901..6a6b47075 100644 --- a/Robust.UnitTesting/Robust.UnitTesting.csproj +++ b/Robust.UnitTesting/Robust.UnitTesting.csproj @@ -2,15 +2,11 @@ false - false - ../bin/UnitTesting true - - @@ -19,16 +15,14 @@ + + + - - - Robust.UnitTesting.Shared.ContentPack.ZipTest.zip - - diff --git a/Robust.UnitTesting/RobustIntegrationTest.NetManager.cs b/Robust.UnitTesting/RobustIntegrationTest.NetManager.cs index 614cb3812..e830ae152 100644 --- a/Robust.UnitTesting/RobustIntegrationTest.NetManager.cs +++ b/Robust.UnitTesting/RobustIntegrationTest.NetManager.cs @@ -10,7 +10,6 @@ using Lidgren.Network; using Robust.Shared.Asynchronous; using Robust.Shared.IoC; using Robust.Shared.Network; -using Robust.Shared.Network.Messages; using Robust.Shared.Player; using Robust.Shared.Serialization; using Robust.Shared.Timing; diff --git a/Robust.UnitTesting/RobustIntegrationTest.TestPair.cs b/Robust.UnitTesting/RobustIntegrationTest.TestPair.cs index 38c680c27..a2bb7f552 100644 --- a/Robust.UnitTesting/RobustIntegrationTest.TestPair.cs +++ b/Robust.UnitTesting/RobustIntegrationTest.TestPair.cs @@ -1,6 +1,4 @@ using System.Threading.Tasks; -using Robust.Client; -using Robust.Server; using Robust.Shared.Log; using Robust.UnitTesting.Pool; diff --git a/Robust.UnitTesting/RobustIntegrationTest.cs b/Robust.UnitTesting/RobustIntegrationTest.cs index 5db67f698..48be51495 100644 --- a/Robust.UnitTesting/RobustIntegrationTest.cs +++ b/Robust.UnitTesting/RobustIntegrationTest.cs @@ -36,8 +36,8 @@ using Robust.Shared.Player; using Robust.Shared.Prototypes; using Robust.Shared.Reflection; using Robust.Shared.Serialization; +using Robust.Shared.Testing; using Robust.Shared.Timing; -using Robust.UnitTesting.Pool; using ServerProgram = Robust.Server.Program; namespace Robust.UnitTesting @@ -83,6 +83,9 @@ namespace Robust.UnitTesting /// protected virtual ServerIntegrationInstance StartServer(ServerIntegrationOptions? options = null) { + options ??= new ServerIntegrationOptions(); + options.TestAssembly = GetType().Assembly; + ServerIntegrationInstance instance; if (ShouldPool(options)) @@ -132,6 +135,9 @@ namespace Robust.UnitTesting /// protected virtual ClientIntegrationInstance StartClient(ClientIntegrationOptions? options = null) { + options ??= new ClientIntegrationOptions(); + options.TestAssembly = GetType().Assembly; + ClientIntegrationInstance instance; if (ShouldPool(options)) @@ -717,8 +723,8 @@ namespace Robust.UnitTesting //ServerProgram.SetupLogging(); ServerProgram.InitReflectionManager(deps); - if (Options?.LoadTestAssembly != false) - deps.Resolve().LoadAssemblies(typeof(RobustIntegrationTest).Assembly); + if (Options?.LoadTestAssembly != false && Options?.TestAssembly != null) + deps.Resolve().LoadAssemblies(Options.TestAssembly); var server = DependencyCollection.Resolve(); @@ -747,6 +753,7 @@ namespace Robust.UnitTesting var cfg = deps.Resolve(); cfg.LoadCVarsFromAssembly(typeof(RobustIntegrationTest).Assembly); + cfg.LoadCVarsFromAssembly(typeof(RTCVars).Assembly); if (Options != null) { @@ -977,8 +984,8 @@ namespace Robust.UnitTesting GameController.RegisterReflection(deps); - if (Options?.LoadTestAssembly != false) - deps.Resolve().LoadAssemblies(typeof(RobustIntegrationTest).Assembly); + if (Options?.LoadTestAssembly != false && Options?.TestAssembly != null) + deps.Resolve().LoadAssemblies(Options.TestAssembly); var client = DependencyCollection.Resolve(); @@ -1007,6 +1014,7 @@ namespace Robust.UnitTesting var cfg = deps.Resolve(); cfg.LoadCVarsFromAssembly(typeof(RobustIntegrationTest).Assembly); + cfg.LoadCVarsFromAssembly(typeof(RTCVars).Assembly); if (Options != null) { @@ -1214,6 +1222,7 @@ namespace Robust.UnitTesting public Assembly[]? ContentAssemblies { get; set; } public bool LoadTestAssembly { get; set; } = true; + public Assembly? TestAssembly { get; set; } /// /// String containing extra prototypes to load. Contents of the string are treated like a yaml file in the diff --git a/Robust.UnitTesting/RobustIntegrationTestDummy.cs b/Robust.UnitTesting/RobustIntegrationTestDummy.cs new file mode 100644 index 000000000..78e2aceb4 --- /dev/null +++ b/Robust.UnitTesting/RobustIntegrationTestDummy.cs @@ -0,0 +1,13 @@ +using NUnit.Framework; + +namespace Robust.UnitTesting; + +[TestFixture] +internal sealed class RobustIntegrationTestDummy : RobustIntegrationTest +{ + [Test] + public void Foo() + { + // Nada. + } +} diff --git a/Robust.UnitTesting/RobustUnitTest.IoC.cs b/Robust.UnitTesting/RobustUnitTest.IoC.cs index 7d9d20ca7..e69d60c2d 100644 --- a/Robust.UnitTesting/RobustUnitTest.IoC.cs +++ b/Robust.UnitTesting/RobustUnitTest.IoC.cs @@ -3,6 +3,7 @@ using Robust.Client; using Robust.Server; using Robust.Shared.ContentPack; using Robust.Shared.IoC; +using Robust.Shared.Testing; namespace Robust.UnitTesting { diff --git a/Robust.UnitTesting/RobustUnitTest.cs b/Robust.UnitTesting/RobustUnitTest.cs index fdccbcc57..71e63806a 100644 --- a/Robust.UnitTesting/RobustUnitTest.cs +++ b/Robust.UnitTesting/RobustUnitTest.cs @@ -14,18 +14,16 @@ using Robust.Shared.Console; using Robust.Shared.Containers; using Robust.Shared.ContentPack; using Robust.Shared.EntitySerialization.Components; -using Robust.Shared.EntitySerialization.Systems; using Robust.Shared.GameObjects; using Robust.Shared.IoC; using Robust.Shared.Map; using Robust.Shared.Map.Components; using Robust.Shared.Physics; using Robust.Shared.Physics.Components; -using Robust.Shared.Physics.Controllers; -using Robust.Shared.Physics.Dynamics; using Robust.Shared.Physics.Systems; using Robust.Shared.Player; using Robust.Shared.Reflection; +using Robust.Shared.Testing; using Robust.Shared.Threading; using Robust.Shared.Utility; using AppearanceSystem = Robust.Client.GameObjects.AppearanceSystem; @@ -112,7 +110,7 @@ namespace Robust.UnitTesting configurationManager.LoadCVarsFromAssembly(assembly); } - configurationManager.LoadCVarsFromAssembly(typeof(RobustUnitTest).Assembly); + configurationManager.LoadCVarsFromAssembly(typeof(RTCVars).Assembly); var systems = deps.Resolve(); // Required systems diff --git a/Robust.UnitTesting/Shared/Serialization/SerializationTest.cs b/Robust.UnitTesting/Shared/Serialization/SerializationTest.cs index dedb3f5cb..bb9f21f38 100644 --- a/Robust.UnitTesting/Shared/Serialization/SerializationTest.cs +++ b/Robust.UnitTesting/Shared/Serialization/SerializationTest.cs @@ -14,10 +14,14 @@ namespace Robust.UnitTesting.Shared.Serialization protected virtual Assembly[] Assemblies => Array.Empty(); + protected override Assembly[] GetContentAssemblies() + { + return Assemblies; + } + [OneTimeSetUp] public void OneTimeSetup() { - Reflection.LoadAssemblies(Assemblies); Serialization.Initialize(); } } diff --git a/Robust.UnitTesting/Shared/Utility/PrettyPrint_Test.cs b/Robust.UnitTesting/Shared/Utility/PrettyPrint_Test.cs deleted file mode 100644 index 2aa70c8e0..000000000 --- a/Robust.UnitTesting/Shared/Utility/PrettyPrint_Test.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System.Collections.Generic; -using NUnit.Framework; -using Robust.Shared.Utility; - -namespace Robust.Shared.TestPrettyPrint -{ - public sealed class Foo - { - override public string ToString() { return "ACustomFooRep"; } - } - - public sealed class Bar {} -} - -namespace Robust.UnitTesting.Shared.Utility -{ - - - [TestFixture] - [Parallelizable(ParallelScope.Fixtures | ParallelScope.All)] - [TestOf(typeof(PrettyPrint))] - public sealed class PrettyPrint_Test - { - private static IEnumerable<(object val, string expectedRep, string expectedTypeRep)> TestCases { get; } = new (object, string, string)[] - { - (new Robust.Shared.TestPrettyPrint.Foo(), "ACustomFooRep", "R.Sh.TestPrettyPrint.Foo"), - (new Robust.Shared.TestPrettyPrint.Bar(), "R.Sh.TestPrettyPrint.Bar", ""), - }; - - [Test] - public void Test([ValueSource(nameof(TestCases))] (object value, string expectedRep, string expectedTypeRep) data) - { - Assert.That(PrettyPrint.PrintUserFacingWithType(data.value, out var typeRep), Is.EqualTo(data.expectedRep)); - Assert.That(typeRep, Is.EqualTo(data.expectedTypeRep)); - } - } -} diff --git a/Robust.UnitTesting/Shared/Utility/TypeAbbreviations_Test.cs b/Robust.UnitTesting/Shared/Utility/TypeAbbreviations_Test.cs deleted file mode 100644 index 8e3feff25..000000000 --- a/Robust.UnitTesting/Shared/Utility/TypeAbbreviations_Test.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System; -using System.Collections.Generic; -using NUnit.Framework; -using Robust.Shared.Utility; - -namespace Robust.Shared.TestTypeAbbreviation -{ - public sealed class Foo {} - - public sealed class Bar {} -} - -namespace Robust.UnitTesting.Shared.Utility -{ - [TestFixture] - [Parallelizable(ParallelScope.Fixtures | ParallelScope.All)] - [TestOf(typeof(TypeAbbreviation))] - public sealed class TypeAbbreviations_Test - { - private static IEnumerable<(string name, string expected)> NameTestCases { get; } = new[] - { - ("Robust.Shared.GameObjects.Foo", "R.Sh.GO.Foo"), - ("Robust.Client.GameObjects.Foo", "R.C.GO.Foo"), - ("Content.Client.GameObjects.Foo", "C.C.GO.Foo"), - ("Robust.Shared.Maths.Vector2", "R.Sh.M.Vector2"), - ("System.Collections.Generic.List", "S.C.G.List"), - ("System.Math", "S.Math"), - }; - - [Test] - public void Test([ValueSource(nameof(NameTestCases))] (string name, string expected) data) - { - Assert.That(TypeAbbreviation.Abbreviate(data.name), Is.EqualTo(data.expected)); - } - - - private static IEnumerable<(Type type, string expected)> TypeTestCases { get; } = new[] - { - ( typeof(Robust.Shared.TestTypeAbbreviation.Foo) - , "R.Sh.TestTypeAbbreviation.Foo`1[R.Sh.TestTypeAbbreviation.Bar]" - ), - (typeof(Robust.Shared.TestTypeAbbreviation.Bar), "R.Sh.TestTypeAbbreviation.Bar"), - }; - - [Test] - public void Test([ValueSource(nameof(TypeTestCases))] (Type type, string expected) data) - { - Assert.That(TypeAbbreviation.Abbreviate(data.type), Is.EqualTo(data.expected)); - } - } -} diff --git a/RobustToolbox.slnx b/RobustToolbox.slnx index 3e70c919f..db4c40b06 100644 --- a/RobustToolbox.slnx +++ b/RobustToolbox.slnx @@ -97,11 +97,21 @@ + + + + + + + + + +