From 5aed4d3efbe84c9aba9096022f8999e0cfd3f96a Mon Sep 17 00:00:00 2001 From: vladzvx Date: Wed, 3 Apr 2024 00:54:10 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A1=D1=82=D1=80=D1=83=D0=BA=D1=82=D1=83?= =?UTF-8?q?=D1=80=D0=B0=20=D0=BF=D1=80=D0=BE=D0=B5=D0=BA=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Sphagnum.Server.FuncTests/GlobalUsings.cs | 1 - .../Sphagnum.Server.FuncTests.csproj | 25 ------------ src/Sphagnum.Server.FuncTests/UnitTest1.cs | 39 ------------------- src/Sphagnum.sln | 19 +++------ .../Comparers/MessagesComparer.cs | 0 .../ConnectionTests.cs | 0 .../DataGenerators/MessagesGenerator.cs | 0 .../Sphagnum.Common.UnitTests/GlobalUsings.cs | 0 .../MessageParserTests.cs | 0 .../Services/TestConnection.cs | 0 .../Services/TestConnectionFactory.cs | 0 .../Sphagnum.Common.UnitTests.csproj | 2 +- .../TestConnectionTests.cs | 0 13 files changed, 7 insertions(+), 79 deletions(-) delete mode 100644 src/Sphagnum.Server.FuncTests/GlobalUsings.cs delete mode 100644 src/Sphagnum.Server.FuncTests/Sphagnum.Server.FuncTests.csproj delete mode 100644 src/Sphagnum.Server.FuncTests/UnitTest1.cs rename {src => tests}/Sphagnum.Common.UnitTests/Comparers/MessagesComparer.cs (100%) rename {src => tests}/Sphagnum.Common.UnitTests/ConnectionTests.cs (100%) rename {src => tests}/Sphagnum.Common.UnitTests/DataGenerators/MessagesGenerator.cs (100%) rename {src => tests}/Sphagnum.Common.UnitTests/GlobalUsings.cs (100%) rename {src => tests}/Sphagnum.Common.UnitTests/MessageParserTests.cs (100%) rename {src => tests}/Sphagnum.Common.UnitTests/Services/TestConnection.cs (100%) rename {src => tests}/Sphagnum.Common.UnitTests/Services/TestConnectionFactory.cs (100%) rename {src => tests}/Sphagnum.Common.UnitTests/Sphagnum.Common.UnitTests.csproj (86%) rename {src => tests}/Sphagnum.Common.UnitTests/TestConnectionTests.cs (100%) diff --git a/src/Sphagnum.Server.FuncTests/GlobalUsings.cs b/src/Sphagnum.Server.FuncTests/GlobalUsings.cs deleted file mode 100644 index cefced4..0000000 --- a/src/Sphagnum.Server.FuncTests/GlobalUsings.cs +++ /dev/null @@ -1 +0,0 @@ -global using NUnit.Framework; \ No newline at end of file diff --git a/src/Sphagnum.Server.FuncTests/Sphagnum.Server.FuncTests.csproj b/src/Sphagnum.Server.FuncTests/Sphagnum.Server.FuncTests.csproj deleted file mode 100644 index b6709d9..0000000 --- a/src/Sphagnum.Server.FuncTests/Sphagnum.Server.FuncTests.csproj +++ /dev/null @@ -1,25 +0,0 @@ - - - - net8.0 - enable - enable - - false - true - - - - - - - - - - - - - - - - diff --git a/src/Sphagnum.Server.FuncTests/UnitTest1.cs b/src/Sphagnum.Server.FuncTests/UnitTest1.cs deleted file mode 100644 index 513c659..0000000 --- a/src/Sphagnum.Server.FuncTests/UnitTest1.cs +++ /dev/null @@ -1,39 +0,0 @@ -using Sphagnum.Client; -using Sphagnum.Common.Contracts.Login; -using Sphagnum.Server.Broker.Services; - -namespace Sphagnum.Server.FuncTests -{ - public class Tests - { - private BrokerDefaultBase? server; - private ClientDefault? client1; - [SetUp] - public async Task Setup() - { - var connectionFactory = new ConnectionFactory() - { - Hostname = "localhost", - Port = 8081, - Login = "root", - Password = "root", - UserRights = UserRights.All, - }; - server = BrokerDefaultBase.Create(connectionFactory); - await server.StartAsync(connectionFactory.Port); - client1 = new ClientDefault(connectionFactory); - } - - [Test] - public async Task Test1() - { - await client1.Publish(new Common.Contracts.Messaging.Messages.OutgoingMessage("111", new byte[3] { 3, 3, 3 })); - } - - [Test] - public async Task Test2() - { - await client1.Publish(new Common.Contracts.Messaging.Messages.OutgoingMessage("111", new byte[3] { 3, 3, 3 })); - } - } -} \ No newline at end of file diff --git a/src/Sphagnum.sln b/src/Sphagnum.sln index d13ede3..1ecdb21 100644 --- a/src/Sphagnum.sln +++ b/src/Sphagnum.sln @@ -15,8 +15,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{DE8B3036 EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sphagnum.Common", "Sphagnum.Common\Sphagnum.Common.csproj", "{D6EACE65-A4A0-40A9-8896-0BB276471C25}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sphagnum.Common.UnitTests", "Sphagnum.Common.UnitTests\Sphagnum.Common.UnitTests.csproj", "{AD03A219-5187-446E-BB29-6BE8826EA6C1}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "debug", "debug", "{84474E24-8329-4E47-B2A7-C9A968B13716}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sphagnum.DebugClient", "Sphagnum.DebugClient\Sphagnum.DebugClient.csproj", "{91045A44-09DF-4104-BB69-580C639F29B3}" @@ -25,7 +23,7 @@ Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-co EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sphagnum.DebugService", "Sphagnum.DebugService\Sphagnum.DebugService.csproj", "{B6B57A78-D62D-429F-B647-A06B268ECE25}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sphagnum.Server.FuncTests", "Sphagnum.Server.FuncTests\Sphagnum.Server.FuncTests.csproj", "{696ED9DF-9F1A-405B-8C4B-AE56031CC349}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sphagnum.Common.UnitTests", "..\tests\Sphagnum.Common.UnitTests\Sphagnum.Common.UnitTests.csproj", "{AC1BC2AF-36F1-497E-8BC0-8136127AC8B8}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -49,10 +47,6 @@ Global {D6EACE65-A4A0-40A9-8896-0BB276471C25}.Debug|Any CPU.Build.0 = Debug|Any CPU {D6EACE65-A4A0-40A9-8896-0BB276471C25}.Release|Any CPU.ActiveCfg = Release|Any CPU {D6EACE65-A4A0-40A9-8896-0BB276471C25}.Release|Any CPU.Build.0 = Release|Any CPU - {AD03A219-5187-446E-BB29-6BE8826EA6C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AD03A219-5187-446E-BB29-6BE8826EA6C1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AD03A219-5187-446E-BB29-6BE8826EA6C1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AD03A219-5187-446E-BB29-6BE8826EA6C1}.Release|Any CPU.Build.0 = Release|Any CPU {91045A44-09DF-4104-BB69-580C639F29B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {91045A44-09DF-4104-BB69-580C639F29B3}.Debug|Any CPU.Build.0 = Debug|Any CPU {91045A44-09DF-4104-BB69-580C639F29B3}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -65,10 +59,10 @@ Global {B6B57A78-D62D-429F-B647-A06B268ECE25}.Debug|Any CPU.Build.0 = Debug|Any CPU {B6B57A78-D62D-429F-B647-A06B268ECE25}.Release|Any CPU.ActiveCfg = Release|Any CPU {B6B57A78-D62D-429F-B647-A06B268ECE25}.Release|Any CPU.Build.0 = Release|Any CPU - {696ED9DF-9F1A-405B-8C4B-AE56031CC349}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {696ED9DF-9F1A-405B-8C4B-AE56031CC349}.Debug|Any CPU.Build.0 = Debug|Any CPU - {696ED9DF-9F1A-405B-8C4B-AE56031CC349}.Release|Any CPU.ActiveCfg = Release|Any CPU - {696ED9DF-9F1A-405B-8C4B-AE56031CC349}.Release|Any CPU.Build.0 = Release|Any CPU + {AC1BC2AF-36F1-497E-8BC0-8136127AC8B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AC1BC2AF-36F1-497E-8BC0-8136127AC8B8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AC1BC2AF-36F1-497E-8BC0-8136127AC8B8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AC1BC2AF-36F1-497E-8BC0-8136127AC8B8}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -78,10 +72,9 @@ Global {2C86F0B0-B592-4F9E-A1E0-96BC453BCB2B} = {834EE1A0-1D4D-42BD-9F76-F5941DE404C2} {88E2533A-8568-440D-B8A9-05A5372129D9} = {834EE1A0-1D4D-42BD-9F76-F5941DE404C2} {D6EACE65-A4A0-40A9-8896-0BB276471C25} = {834EE1A0-1D4D-42BD-9F76-F5941DE404C2} - {AD03A219-5187-446E-BB29-6BE8826EA6C1} = {DE8B3036-E476-4A92-92E3-4D0B58FC5137} {91045A44-09DF-4104-BB69-580C639F29B3} = {84474E24-8329-4E47-B2A7-C9A968B13716} {B6B57A78-D62D-429F-B647-A06B268ECE25} = {84474E24-8329-4E47-B2A7-C9A968B13716} - {696ED9DF-9F1A-405B-8C4B-AE56031CC349} = {DE8B3036-E476-4A92-92E3-4D0B58FC5137} + {AC1BC2AF-36F1-497E-8BC0-8136127AC8B8} = {DE8B3036-E476-4A92-92E3-4D0B58FC5137} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {6AE6D1E4-6CC3-4D93-8498-A7E5ADC24A77} diff --git a/src/Sphagnum.Common.UnitTests/Comparers/MessagesComparer.cs b/tests/Sphagnum.Common.UnitTests/Comparers/MessagesComparer.cs similarity index 100% rename from src/Sphagnum.Common.UnitTests/Comparers/MessagesComparer.cs rename to tests/Sphagnum.Common.UnitTests/Comparers/MessagesComparer.cs diff --git a/src/Sphagnum.Common.UnitTests/ConnectionTests.cs b/tests/Sphagnum.Common.UnitTests/ConnectionTests.cs similarity index 100% rename from src/Sphagnum.Common.UnitTests/ConnectionTests.cs rename to tests/Sphagnum.Common.UnitTests/ConnectionTests.cs diff --git a/src/Sphagnum.Common.UnitTests/DataGenerators/MessagesGenerator.cs b/tests/Sphagnum.Common.UnitTests/DataGenerators/MessagesGenerator.cs similarity index 100% rename from src/Sphagnum.Common.UnitTests/DataGenerators/MessagesGenerator.cs rename to tests/Sphagnum.Common.UnitTests/DataGenerators/MessagesGenerator.cs diff --git a/src/Sphagnum.Common.UnitTests/GlobalUsings.cs b/tests/Sphagnum.Common.UnitTests/GlobalUsings.cs similarity index 100% rename from src/Sphagnum.Common.UnitTests/GlobalUsings.cs rename to tests/Sphagnum.Common.UnitTests/GlobalUsings.cs diff --git a/src/Sphagnum.Common.UnitTests/MessageParserTests.cs b/tests/Sphagnum.Common.UnitTests/MessageParserTests.cs similarity index 100% rename from src/Sphagnum.Common.UnitTests/MessageParserTests.cs rename to tests/Sphagnum.Common.UnitTests/MessageParserTests.cs diff --git a/src/Sphagnum.Common.UnitTests/Services/TestConnection.cs b/tests/Sphagnum.Common.UnitTests/Services/TestConnection.cs similarity index 100% rename from src/Sphagnum.Common.UnitTests/Services/TestConnection.cs rename to tests/Sphagnum.Common.UnitTests/Services/TestConnection.cs diff --git a/src/Sphagnum.Common.UnitTests/Services/TestConnectionFactory.cs b/tests/Sphagnum.Common.UnitTests/Services/TestConnectionFactory.cs similarity index 100% rename from src/Sphagnum.Common.UnitTests/Services/TestConnectionFactory.cs rename to tests/Sphagnum.Common.UnitTests/Services/TestConnectionFactory.cs diff --git a/src/Sphagnum.Common.UnitTests/Sphagnum.Common.UnitTests.csproj b/tests/Sphagnum.Common.UnitTests/Sphagnum.Common.UnitTests.csproj similarity index 86% rename from src/Sphagnum.Common.UnitTests/Sphagnum.Common.UnitTests.csproj rename to tests/Sphagnum.Common.UnitTests/Sphagnum.Common.UnitTests.csproj index efca1b2..738a1ed 100644 --- a/src/Sphagnum.Common.UnitTests/Sphagnum.Common.UnitTests.csproj +++ b/tests/Sphagnum.Common.UnitTests/Sphagnum.Common.UnitTests.csproj @@ -18,7 +18,7 @@ - + diff --git a/src/Sphagnum.Common.UnitTests/TestConnectionTests.cs b/tests/Sphagnum.Common.UnitTests/TestConnectionTests.cs similarity index 100% rename from src/Sphagnum.Common.UnitTests/TestConnectionTests.cs rename to tests/Sphagnum.Common.UnitTests/TestConnectionTests.cs