diff --git a/src/CertificateAuthority.Tests/CaTestHelper.cs b/src/CertificateAuthority.Tests.Common/CaTestHelper.cs similarity index 97% rename from src/CertificateAuthority.Tests/CaTestHelper.cs rename to src/CertificateAuthority.Tests.Common/CaTestHelper.cs index 2fda0ccc636..1463c5ac7f1 100644 --- a/src/CertificateAuthority.Tests/CaTestHelper.cs +++ b/src/CertificateAuthority.Tests.Common/CaTestHelper.cs @@ -13,7 +13,7 @@ using Microsoft.Extensions.DependencyInjection; using Stratis.Feature.PoA.Tokenless; -namespace CertificateAuthority.Tests +namespace CertificateAuthority.Tests.Common { public static class CaTestHelper { @@ -64,7 +64,7 @@ public static CredentialsModel CreateAccount(IWebHost server, AccountAccessFlags return new CredentialsModel(id, password); } - internal static void InitializeCa(TestServer server) + public static void InitializeCa(TestServer server) { var network = new TokenlessNetwork(); diff --git a/src/CertificateAuthority.Tests.Common/CertificateAuthority.Tests.Common.csproj b/src/CertificateAuthority.Tests.Common/CertificateAuthority.Tests.Common.csproj new file mode 100644 index 00000000000..b55030d4707 --- /dev/null +++ b/src/CertificateAuthority.Tests.Common/CertificateAuthority.Tests.Common.csproj @@ -0,0 +1,21 @@ + + + + Library + netcoreapp2.1 + + + + + + + + + + + + + + + + diff --git a/src/CertificateAuthority.Tests/TestOnlyStartup.cs b/src/CertificateAuthority.Tests.Common/TestOnlyStartup.cs similarity index 96% rename from src/CertificateAuthority.Tests/TestOnlyStartup.cs rename to src/CertificateAuthority.Tests.Common/TestOnlyStartup.cs index 28fb3563328..6ab30d87c5c 100644 --- a/src/CertificateAuthority.Tests/TestOnlyStartup.cs +++ b/src/CertificateAuthority.Tests.Common/TestOnlyStartup.cs @@ -5,7 +5,7 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; -namespace CertificateAuthority.Tests +namespace CertificateAuthority.Tests.Common { public class TestOnlyStartup : Startup { diff --git a/src/CertificateAuthority.Tests/CertificateAuthority.Tests.csproj b/src/CertificateAuthority.Tests/CertificateAuthority.Tests.csproj index 0a9091f9e80..2f2fa438520 100644 --- a/src/CertificateAuthority.Tests/CertificateAuthority.Tests.csproj +++ b/src/CertificateAuthority.Tests/CertificateAuthority.Tests.csproj @@ -11,7 +11,6 @@ - @@ -23,6 +22,7 @@ + diff --git a/src/CertificateAuthority.Tests/FullProjectTests/AccountsControllerTests.cs b/src/CertificateAuthority.Tests/FullProjectTests/AccountsControllerTests.cs index 29590e69aed..4fbf3dcb464 100644 --- a/src/CertificateAuthority.Tests/FullProjectTests/AccountsControllerTests.cs +++ b/src/CertificateAuthority.Tests/FullProjectTests/AccountsControllerTests.cs @@ -3,6 +3,7 @@ using CertificateAuthority.Controllers; using CertificateAuthority.Database; using CertificateAuthority.Models; +using CertificateAuthority.Tests.Common; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.TestHost; diff --git a/src/CertificateAuthority.Tests/FullProjectTests/CertificateAuthorityIntegrationTests.cs b/src/CertificateAuthority.Tests/FullProjectTests/CertificateAuthorityIntegrationTests.cs index f7e05e7edf7..630f8cb3dda 100644 --- a/src/CertificateAuthority.Tests/FullProjectTests/CertificateAuthorityIntegrationTests.cs +++ b/src/CertificateAuthority.Tests/FullProjectTests/CertificateAuthorityIntegrationTests.cs @@ -4,6 +4,7 @@ using System.Security.Cryptography.X509Certificates; using CertificateAuthority.Controllers; using CertificateAuthority.Models; +using CertificateAuthority.Tests.Common; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.TestHost; using NBitcoin; diff --git a/src/CertificateAuthority.Tests/FullProjectTests/ControllersTests.cs b/src/CertificateAuthority.Tests/FullProjectTests/ControllersTests.cs index 16ef344a373..b1ff864a3e9 100644 --- a/src/CertificateAuthority.Tests/FullProjectTests/ControllersTests.cs +++ b/src/CertificateAuthority.Tests/FullProjectTests/ControllersTests.cs @@ -6,6 +6,7 @@ using CertificateAuthority.Controllers; using CertificateAuthority.Database; using CertificateAuthority.Models; +using CertificateAuthority.Tests.Common; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.TestHost; diff --git a/src/Stratis.DLT.sln b/src/Stratis.DLT.sln index 72e015b109b..4f0f80145b1 100644 --- a/src/Stratis.DLT.sln +++ b/src/Stratis.DLT.sln @@ -138,6 +138,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CertificateAuthority.Tests" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CertificateAuthority.API", "CertificateAuthority.API\CertificateAuthority.API.csproj", "{5A0A1334-49E2-4EE1-94E5-91E65D8805F6}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CertificateAuthority.Tests.Common", "CertificateAuthority.Tests.Common\CertificateAuthority.Tests.Common.csproj", "{7A1A920F-88C7-4087-90FA-CE3E086A2ED2}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -352,6 +354,10 @@ Global {5A0A1334-49E2-4EE1-94E5-91E65D8805F6}.Debug|Any CPU.Build.0 = Debug|Any CPU {5A0A1334-49E2-4EE1-94E5-91E65D8805F6}.Release|Any CPU.ActiveCfg = Release|Any CPU {5A0A1334-49E2-4EE1-94E5-91E65D8805F6}.Release|Any CPU.Build.0 = Release|Any CPU + {7A1A920F-88C7-4087-90FA-CE3E086A2ED2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7A1A920F-88C7-4087-90FA-CE3E086A2ED2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7A1A920F-88C7-4087-90FA-CE3E086A2ED2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7A1A920F-88C7-4087-90FA-CE3E086A2ED2}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -407,6 +413,7 @@ Global {EE3A494D-5AAC-4A61-B993-5056A6D1C3A3} = {1B9A916F-DDAC-4675-B424-EDEDC1A58231} {85EA24B1-DB43-46E0-8602-4847CABC17C6} = {1B9A916F-DDAC-4675-B424-EDEDC1A58231} {5A0A1334-49E2-4EE1-94E5-91E65D8805F6} = {1B9A916F-DDAC-4675-B424-EDEDC1A58231} + {7A1A920F-88C7-4087-90FA-CE3E086A2ED2} = {1B9A916F-DDAC-4675-B424-EDEDC1A58231} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {6C780ABA-5872-4B83-AD3F-A5BD423AD907} diff --git a/src/Stratis.SmartContracts.IntegrationTests/Stratis.SmartContracts.IntegrationTests.csproj b/src/Stratis.SmartContracts.IntegrationTests/Stratis.SmartContracts.IntegrationTests.csproj index 9cbb49751f8..897318e600e 100644 --- a/src/Stratis.SmartContracts.IntegrationTests/Stratis.SmartContracts.IntegrationTests.csproj +++ b/src/Stratis.SmartContracts.IntegrationTests/Stratis.SmartContracts.IntegrationTests.csproj @@ -48,7 +48,6 @@ - diff --git a/src/Stratis.SmartContracts.IntegrationTests/TokenlessNodeTests.cs b/src/Stratis.SmartContracts.IntegrationTests/TokenlessNodeTests.cs index 50fe764e459..5100fbb2de6 100644 --- a/src/Stratis.SmartContracts.IntegrationTests/TokenlessNodeTests.cs +++ b/src/Stratis.SmartContracts.IntegrationTests/TokenlessNodeTests.cs @@ -8,7 +8,7 @@ using System.Threading.Tasks; using CertificateAuthority; using CertificateAuthority.Models; -using CertificateAuthority.Tests; +using CertificateAuthority.Tests.Common; using Microsoft.AspNetCore; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc; diff --git a/src/Stratis.SmartContracts.Tests.Common/FullTokenlessRunner.cs b/src/Stratis.SmartContracts.Tests.Common/FullTokenlessRunner.cs index 7bbf9b8693b..f687b8a523a 100644 --- a/src/Stratis.SmartContracts.Tests.Common/FullTokenlessRunner.cs +++ b/src/Stratis.SmartContracts.Tests.Common/FullTokenlessRunner.cs @@ -1,5 +1,5 @@ using CertificateAuthority; -using CertificateAuthority.Tests; +using CertificateAuthority.Tests.Common; using NBitcoin; using Stratis.Bitcoin; using Stratis.Bitcoin.Base; diff --git a/src/Stratis.SmartContracts.Tests.Common/SmartContractNodeBuilder.cs b/src/Stratis.SmartContracts.Tests.Common/SmartContractNodeBuilder.cs index c1e945144d9..02afedfbe88 100644 --- a/src/Stratis.SmartContracts.Tests.Common/SmartContractNodeBuilder.cs +++ b/src/Stratis.SmartContracts.Tests.Common/SmartContractNodeBuilder.cs @@ -3,7 +3,7 @@ using System.Runtime.CompilerServices; using CertificateAuthority; using CertificateAuthority.Models; -using CertificateAuthority.Tests; +using CertificateAuthority.Tests.Common; using Microsoft.Extensions.Logging; using NBitcoin; using Org.BouncyCastle.X509; diff --git a/src/Stratis.SmartContracts.Tests.Common/Stratis.SmartContracts.Tests.Common.csproj b/src/Stratis.SmartContracts.Tests.Common/Stratis.SmartContracts.Tests.Common.csproj index d3da8808d1c..5e0ded87f4f 100644 --- a/src/Stratis.SmartContracts.Tests.Common/Stratis.SmartContracts.Tests.Common.csproj +++ b/src/Stratis.SmartContracts.Tests.Common/Stratis.SmartContracts.Tests.Common.csproj @@ -7,7 +7,7 @@ - +