From 86e103b86bc3071657be03fb7fe8a4b532fa99a3 Mon Sep 17 00:00:00 2001 From: Dominion Date: Sat, 22 Apr 2023 10:31:09 -0400 Subject: [PATCH] More integration test reorganization --- .../Instance}/ConcreteHttpClientFactory.cs | 2 +- ...piConstantsTests.cs => TestDMApiConstants.cs} | 16 ++++++++-------- .../{VersionsTest.cs => TestVersions.cs} | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) rename tests/Tgstation.Server.Tests/{ => Live/Instance}/ConcreteHttpClientFactory.cs (81%) rename tests/Tgstation.Server.Tests/{DMApiConstantsTests.cs => TestDMApiConstants.cs} (69%) rename tests/Tgstation.Server.Tests/{VersionsTest.cs => TestVersions.cs} (99%) diff --git a/tests/Tgstation.Server.Tests/ConcreteHttpClientFactory.cs b/tests/Tgstation.Server.Tests/Live/Instance/ConcreteHttpClientFactory.cs similarity index 81% rename from tests/Tgstation.Server.Tests/ConcreteHttpClientFactory.cs rename to tests/Tgstation.Server.Tests/Live/Instance/ConcreteHttpClientFactory.cs index 572c860b27..4050ea8125 100644 --- a/tests/Tgstation.Server.Tests/ConcreteHttpClientFactory.cs +++ b/tests/Tgstation.Server.Tests/Live/Instance/ConcreteHttpClientFactory.cs @@ -1,7 +1,7 @@ using Tgstation.Server.Common; using Tgstation.Server.Host.Core; -namespace Tgstation.Server.Tests +namespace Tgstation.Server.Tests.Live.Instance { sealed class ConcreteHttpClientFactory : IAbstractHttpClientFactory { diff --git a/tests/Tgstation.Server.Tests/DMApiConstantsTests.cs b/tests/Tgstation.Server.Tests/TestDMApiConstants.cs similarity index 69% rename from tests/Tgstation.Server.Tests/DMApiConstantsTests.cs rename to tests/Tgstation.Server.Tests/TestDMApiConstants.cs index e822a79887..d248c6df76 100644 --- a/tests/Tgstation.Server.Tests/DMApiConstantsTests.cs +++ b/tests/Tgstation.Server.Tests/TestDMApiConstants.cs @@ -10,7 +10,7 @@ using Tgstation.Server.Host.Components.Interop; namespace Tgstation.Server.Tests { [TestClass] - public sealed class DMApiConstantsTests + public sealed class TestDMApiConstants { string[] definesFileLines; @@ -21,13 +21,13 @@ namespace Tgstation.Server.Tests } [TestMethod] - public void TestDMApiConstants() - { - // we only test a few things because they are sourced by BYOND and we want to validate them - CheckLine("DMAPI5_BRIDGE_REQUEST_LIMIT", DMApiConstants.MaximumBridgeRequestLength); - CheckLine("DMAPI5_TOPIC_REQUEST_LIMIT", DMApiConstants.MaximumTopicRequestLength); - CheckLine("DMAPI5_TOPIC_RESPONSE_LIMIT", DMApiConstants.MaximumTopicResponseLength); - } + public void TestBridgeRequestLimit() => CheckLine("DMAPI5_BRIDGE_REQUEST_LIMIT", DMApiConstants.MaximumBridgeRequestLength); + + [TestMethod] + public void TestTopicRequestLimit() => CheckLine("DMAPI5_TOPIC_REQUEST_LIMIT", DMApiConstants.MaximumTopicRequestLength); + + [TestMethod] + public void TestTopicResponseLimit() => CheckLine("DMAPI5_TOPIC_RESPONSE_LIMIT", DMApiConstants.MaximumTopicResponseLength); void CheckLine(string defineName, object expectedValue) { diff --git a/tests/Tgstation.Server.Tests/VersionsTest.cs b/tests/Tgstation.Server.Tests/TestVersions.cs similarity index 99% rename from tests/Tgstation.Server.Tests/VersionsTest.cs rename to tests/Tgstation.Server.Tests/TestVersions.cs index 15489c51eb..9977f68041 100644 --- a/tests/Tgstation.Server.Tests/VersionsTest.cs +++ b/tests/Tgstation.Server.Tests/TestVersions.cs @@ -18,7 +18,7 @@ namespace Tgstation.Server.Tests { [TestClass] [TestCategory("SkipWhenLiveUnitTesting")] - public sealed class VersionsTest + public sealed class TestVersions { XNamespace xmlNamespace;