Split up test project

Robust.UnitTesting was both ALL tests for RT, and also API surface for content tests.

Tests are now split into separate projects as appropriate, and the API side has also been split off.
This commit is contained in:
PJB3005
2025-12-16 01:36:53 +01:00
parent 095c5f58d9
commit 788e9386fd
284 changed files with 849 additions and 595 deletions

View File

@@ -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)

View File

@@ -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)

View File

@@ -0,0 +1,30 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\MSBuild\Robust.Engine.props"/>
<PropertyGroup>
<ImplicitUsings>enable</ImplicitUsings>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>../bin/Client.IntegrationTests</OutputPath>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="JetBrains.Annotations"/>
<PackageReference Include="Microsoft.NET.Test.Sdk"/>
<PackageReference Include="Moq" />
<PackageReference Include="NUnit"/>
<PackageReference Include="NUnit3TestAdapter"/>
<PackageReference Include="NUnit.Analyzers"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Robust.Client\Robust.Client.csproj" />
<ProjectReference Include="..\Robust.Server.Testing\Robust.Server.Testing.csproj" />
<ProjectReference Include="..\Robust.Server\Robust.Server.csproj" />
<ProjectReference Include="..\Robust.Shared.Maths\Robust.Shared.Maths.csproj"/>
<ProjectReference Include="..\Robust.Shared.Maths.Testing\Robust.Shared.Maths.Testing.csproj"/>
<ProjectReference Include="..\Robust.Shared\Robust.Shared.csproj"/>
<ProjectReference Include="..\Robust.UnitTesting\Robust.UnitTesting.csproj" />
</ItemGroup>
<Import Project="..\MSBuild\Robust.Properties.targets"/>
</Project>

View File

@@ -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
{

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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

View File

@@ -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)]

View File

@@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\MSBuild\Robust.Engine.props"/>
<PropertyGroup>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="JetBrains.Annotations"/>
<PackageReference Include="Microsoft.NET.Test.Sdk"/>
<PackageReference Include="NUnit"/>
<PackageReference Include="NUnit3TestAdapter"/>
<PackageReference Include="NUnit.Analyzers"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Robust.Client\Robust.Client.csproj" />
<ProjectReference Include="..\Robust.Shared.Maths.Tests\Robust.Shared.Maths.Tests.csproj" />
<ProjectReference Include="..\Robust.Shared.Maths\Robust.Shared.Maths.csproj"/>
<ProjectReference Include="..\Robust.Shared.Maths.Testing\Robust.Shared.Maths.Testing.csproj"/>
<ProjectReference Include="..\Robust.Shared\Robust.Shared.csproj"/>
</ItemGroup>
<Import Project="..\MSBuild\Robust.Properties.targets"/>
</Project>

View File

@@ -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))]

View File

@@ -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]

View File

@@ -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]

View File

@@ -1,7 +1,7 @@
using NUnit.Framework;
using Robust.Packaging.AssetProcessing;
namespace Robust.UnitTesting.Packaging;
namespace Robust.Packaging.Tests;
/// <summary>
/// Helper class for testing <see cref="AssetPass"/>.

View File

@@ -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;
/// <summary>
/// A simple asset pass that stores all files it receives, for introspection by tests.

View File

@@ -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;
/// <summary>
/// Package logger for writing to NUnit's test context.

View File

@@ -0,0 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\MSBuild\Robust.Engine.props"/>
<PropertyGroup>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="JetBrains.Annotations"/>
<PackageReference Include="Microsoft.NET.Test.Sdk"/>
<PackageReference Include="NUnit"/>
<PackageReference Include="NUnit3TestAdapter"/>
<PackageReference Include="NUnit.Analyzers"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Robust.Packaging\Robust.Packaging.csproj"/>
</ItemGroup>
<Import Project="..\MSBuild\Robust.Properties.targets"/>
</Project>

View File

@@ -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
{
/// <summary>
/// Asserts whether a component added after an entity has fully initialized has MapInit called.

View File

@@ -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;

View File

@@ -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
{
/// <summary>
/// Asserts that calling SetWorldPosition while in a container correctly removes the entity from its container.

View File

@@ -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;

View File

@@ -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()

View File

@@ -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!;

View File

@@ -0,0 +1,30 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\MSBuild\Robust.Engine.props"/>
<PropertyGroup>
<ImplicitUsings>enable</ImplicitUsings>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>../bin/Server.IntegrationTests</OutputPath>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="JetBrains.Annotations"/>
<PackageReference Include="Microsoft.NET.Test.Sdk"/>
<PackageReference Include="Moq" />
<PackageReference Include="NUnit"/>
<PackageReference Include="NUnit3TestAdapter"/>
<PackageReference Include="NUnit.Analyzers"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Robust.Server.Testing\Robust.Server.Testing.csproj" />
<ProjectReference Include="..\Robust.Server\Robust.Server.csproj" />
<ProjectReference Include="..\Robust.Shared.Maths.Tests\Robust.Shared.Maths.Tests.csproj" />
<ProjectReference Include="..\Robust.Shared.Maths\Robust.Shared.Maths.csproj"/>
<ProjectReference Include="..\Robust.Shared.Maths.Testing\Robust.Shared.Maths.Testing.csproj"/>
<ProjectReference Include="..\Robust.Shared\Robust.Shared.csproj"/>
<ProjectReference Include="..\Robust.UnitTesting\Robust.UnitTesting.csproj" />
</ItemGroup>
<Import Project="..\MSBuild\Robust.Properties.targets"/>
</Project>

View File

@@ -0,0 +1,3 @@
using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("Robust.Shared.IntegrationTests")]

View File

@@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\MSBuild\Robust.Engine.props"/>
<PropertyGroup>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="JetBrains.Annotations"/>
<PackageReference Include="Moq" />
<PackageReference Include="NUnit"/>
<PackageReference Include="NUnit.Analyzers"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Robust.Server\Robust.Server.csproj"/>
<ProjectReference Include="..\Robust.Shared.Maths\Robust.Shared.Maths.csproj"/>
<ProjectReference Include="..\Robust.Shared.Maths.Testing\Robust.Shared.Maths.Testing.csproj"/>
<ProjectReference Include="..\Robust.Shared.Testing\Robust.Shared.Testing.csproj" />
<ProjectReference Include="..\Robust.Shared\Robust.Shared.csproj"/>
</ItemGroup>
<Import Project="..\MSBuild\Robust.Properties.targets"/>
</Project>

View File

@@ -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<ILogManager>();
logMan.RootSawmill.AddHandler(new TestLogHandler(configMan, "SIM"));

View File

@@ -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]

View File

@@ -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;

View File

@@ -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()

View File

@@ -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 =
{

View File

@@ -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()

View File

@@ -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);

View File

@@ -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

View File

@@ -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 = $@"

View File

@@ -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
{
/// <summary>
/// Check that v3 maps can be loaded. This simply tries to load a file and doesn't do a lot of extra validation.

View File

@@ -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
{
/// <summary>
/// Check that v4 maps can be loaded. This simply tries to load a file and doesn't do a lot of extra validation.

View File

@@ -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
{
/// <summary>
/// Check that v5 maps can be loaded. This simply tries to load a file and doesn't do a lot of extra validation.

View File

@@ -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
{
/// <summary>
/// Check that v6 maps can be loaded. This simply tries to load a file and doesn't do a lot of extra validation.

View File

@@ -16,7 +16,7 @@ namespace Robust.UnitTesting.Shared.EntitySerialization;
/// Test that older file formats can still be loaded.
/// </summary>
[TestFixture]
public sealed partial class BackwardsCompatibilityTest : RobustIntegrationTest
internal sealed partial class BackwardsCompatibilityTest : RobustIntegrationTest
{
/// <summary>
/// Check that v7 maps can be loaded. This just re-uses some map files that are generated by other tests, and then

View File

@@ -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 = $@"

View File

@@ -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
{
/// <summary>
/// Check that whether or not an entity has been paused or map-initialized is preserved across saves & loads.

View File

@@ -16,7 +16,7 @@ namespace Robust.UnitTesting.Shared.EntitySerialization;
/// onto a paused map should pause it.
/// </summary>
[TestFixture]
public sealed partial class MapMergeTest : RobustIntegrationTest
internal sealed partial class MapMergeTest : RobustIntegrationTest
{
private const string TestTileDefId = "a";
private const string TestPrototypes = $@"

View File

@@ -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 = $@"

View File

@@ -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()

View File

@@ -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
{
/// <summary>
/// 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.
/// </summary>
[Prototype("testTileDef")]
public sealed partial class TileDef : ITileDefinition
internal sealed partial class TileDef : ITileDefinition
{
public ushort TileId { get; set; }
public string Name => ID;

View File

@@ -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";

View File

@@ -15,7 +15,7 @@ using Robust.Shared.Utility;
namespace Robust.UnitTesting.Shared.GameObjects
{
public sealed class ContainerTests : RobustIntegrationTest
internal sealed class ContainerTests : RobustIntegrationTest
{
/// <summary>
/// Tests container states with children that do not exist on the client

View File

@@ -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.

View File

@@ -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()

View File

@@ -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.

View File

@@ -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()
{

View File

@@ -7,7 +7,7 @@ using Robust.UnitTesting.Server;
namespace Robust.UnitTesting.Shared.GameObjects
{
public partial class EntityEventBusTests
internal sealed partial class EntityEventBusTests
{
[Test]

View File

@@ -7,7 +7,7 @@ using Robust.UnitTesting.Server;
namespace Robust.UnitTesting.Shared.GameObjects
{
public partial class EntityEventBusTests
internal sealed partial class EntityEventBusTests
{
}

View File

@@ -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
{
}
}

View File

@@ -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()

View File

@@ -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 = $@"

View File

@@ -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
{

View File

@@ -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!;
}

View File

@@ -5,7 +5,7 @@ using System.Text;
namespace Robust.UnitTesting.Shared.GameObjects;
public sealed class GenericEntityPrint
internal sealed class GenericEntityPrint
{
//[Test]
public void Print()

View File

@@ -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

View File

@@ -10,7 +10,7 @@ using Robust.UnitTesting.Server;
namespace Robust.UnitTesting.Shared.GameObjects
{
[TestFixture]
public sealed class TransformComponent_Tests
internal sealed class TransformComponent_Tests
{
/// <summary>
/// Verify that WorldPosition and WorldRotation return the same result as the faster helper method.

View File

@@ -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
{
/// <summary>
/// Does basic testing for AutoNetworkedFieldAttribute and AutoGenerateComponentStateAttribute

View File

@@ -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
{
/// <summary>
/// This tests performs a basic check to ensure that there is no issue with entity states referencing other

View File

@@ -18,7 +18,7 @@ namespace Robust.UnitTesting.Shared.GameState;
/// <remarks>
/// Should help prevent the issue fixed in PR #4044 from reoccurring.
/// </remarks>
public sealed class DeletionNetworkingTests : RobustIntegrationTest
internal sealed class DeletionNetworkingTests : RobustIntegrationTest
{
[Test]
public async Task DeletionNetworkingTest()

View File

@@ -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;
/// <summary>
/// This is a test of test engine <see cref="RobustIntegrationTest"/>. Not a test of game engine.
/// </summary>
public sealed partial class NoSharedReferencesTest : RobustIntegrationTest
internal sealed partial class NoSharedReferencesTest : RobustIntegrationTest
{
/// <summary>
/// The test performs a basic check to ensure that there is no issue with server's object references leaking to client.

View File

@@ -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
{
/// <summary>
/// This tests checks that entity visibility masks are recursively applied to children.

View File

@@ -0,0 +1 @@
global using Is = NUnit.Framework.Is;

Some files were not shown because too many files have changed in this diff Show More