From d4c548757e571fc0dd7251d9a3d319c28da5a2bf Mon Sep 17 00:00:00 2001 From: manuelalonsoperez Date: Mon, 30 Sep 2019 15:46:29 +0200 Subject: [PATCH 01/21] Legger til nytt prosjekt for Archive --- .../Digipost.Signature.Api.Client.Archive.csproj | 8 ++++++++ signature-api-client.sln | 6 ++++++ 2 files changed, 14 insertions(+) create mode 100644 Digipost.Signature.Api.Client.Archive/Digipost.Signature.Api.Client.Archive.csproj diff --git a/Digipost.Signature.Api.Client.Archive/Digipost.Signature.Api.Client.Archive.csproj b/Digipost.Signature.Api.Client.Archive/Digipost.Signature.Api.Client.Archive.csproj new file mode 100644 index 00000000..6cc2c134 --- /dev/null +++ b/Digipost.Signature.Api.Client.Archive/Digipost.Signature.Api.Client.Archive.csproj @@ -0,0 +1,8 @@ + + + + Digipost Signature Api Client Archive + Digipost.Signature.Api.Client.Archive + + + diff --git a/signature-api-client.sln b/signature-api-client.sln index 6fbfa934..fcae0e62 100644 --- a/signature-api-client.sln +++ b/signature-api-client.sln @@ -22,6 +22,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Digipost.Signature.Api.Clie EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Digipost.Signature.Api.Client.Docs", "Digipost.Signature.Api.Client.Docs\Digipost.Signature.Api.Client.Docs.csproj", "{7E7F2F9E-B2A5-4ED2-80FF-9410268FE373}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Digipost.Signature.Api.Client.Archive", "Digipost.Signature.Api.Client.Archive\Digipost.Signature.Api.Client.Archive.csproj", "{790E446C-E0EC-40D9-B489-E0C255539229}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -68,6 +70,10 @@ Global {7E7F2F9E-B2A5-4ED2-80FF-9410268FE373}.Debug|Any CPU.Build.0 = Debug|Any CPU {7E7F2F9E-B2A5-4ED2-80FF-9410268FE373}.Release|Any CPU.ActiveCfg = Release|Any CPU {7E7F2F9E-B2A5-4ED2-80FF-9410268FE373}.Release|Any CPU.Build.0 = Release|Any CPU + {790E446C-E0EC-40D9-B489-E0C255539229}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {790E446C-E0EC-40D9-B489-E0C255539229}.Debug|Any CPU.Build.0 = Debug|Any CPU + {790E446C-E0EC-40D9-B489-E0C255539229}.Release|Any CPU.ActiveCfg = Release|Any CPU + {790E446C-E0EC-40D9-B489-E0C255539229}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE From 0e3eb62d7c43ac997e5f9acaef13525cb082f0d6 Mon Sep 17 00:00:00 2001 From: manuelalonsoperez Date: Mon, 30 Sep 2019 15:57:54 +0200 Subject: [PATCH 02/21] Nytt Arkive test prosjekt --- ...gipost.Signature.Api.Client.Archive.Tests.csproj | 13 +++++++++++++ signature-api-client.sln | 6 ++++++ 2 files changed, 19 insertions(+) create mode 100644 Digipost.Signature.Api.Client.Archive.Tests/Digipost.Signature.Api.Client.Archive.Tests.csproj diff --git a/Digipost.Signature.Api.Client.Archive.Tests/Digipost.Signature.Api.Client.Archive.Tests.csproj b/Digipost.Signature.Api.Client.Archive.Tests/Digipost.Signature.Api.Client.Archive.Tests.csproj new file mode 100644 index 00000000..a7076fb5 --- /dev/null +++ b/Digipost.Signature.Api.Client.Archive.Tests/Digipost.Signature.Api.Client.Archive.Tests.csproj @@ -0,0 +1,13 @@ + + + + false + + + + + + + + + diff --git a/signature-api-client.sln b/signature-api-client.sln index fcae0e62..9c6310ac 100644 --- a/signature-api-client.sln +++ b/signature-api-client.sln @@ -24,6 +24,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Digipost.Signature.Api.Clie EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Digipost.Signature.Api.Client.Archive", "Digipost.Signature.Api.Client.Archive\Digipost.Signature.Api.Client.Archive.csproj", "{790E446C-E0EC-40D9-B489-E0C255539229}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Digipost.Signature.Api.Client.Archive.Tests", "Digipost.Signature.Api.Client.Archive.Tests\Digipost.Signature.Api.Client.Archive.Tests.csproj", "{FCE5496E-EC18-4C38-9E3C-252EF202F781}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -74,6 +76,10 @@ Global {790E446C-E0EC-40D9-B489-E0C255539229}.Debug|Any CPU.Build.0 = Debug|Any CPU {790E446C-E0EC-40D9-B489-E0C255539229}.Release|Any CPU.ActiveCfg = Release|Any CPU {790E446C-E0EC-40D9-B489-E0C255539229}.Release|Any CPU.Build.0 = Release|Any CPU + {FCE5496E-EC18-4C38-9E3C-252EF202F781}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FCE5496E-EC18-4C38-9E3C-252EF202F781}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FCE5496E-EC18-4C38-9E3C-252EF202F781}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FCE5496E-EC18-4C38-9E3C-252EF202F781}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE From b37f3fee9c94a2da1a1025f3c0285512be63bbe4 Mon Sep 17 00:00:00 2001 From: manuelalonsoperez Date: Tue, 1 Oct 2019 09:17:32 +0200 Subject: [PATCH 03/21] Smoke mappe lagd til --- .../Digipost.Signature.Api.Client.Archive.Tests.csproj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Digipost.Signature.Api.Client.Archive.Tests/Digipost.Signature.Api.Client.Archive.Tests.csproj b/Digipost.Signature.Api.Client.Archive.Tests/Digipost.Signature.Api.Client.Archive.Tests.csproj index a7076fb5..2a24d275 100644 --- a/Digipost.Signature.Api.Client.Archive.Tests/Digipost.Signature.Api.Client.Archive.Tests.csproj +++ b/Digipost.Signature.Api.Client.Archive.Tests/Digipost.Signature.Api.Client.Archive.Tests.csproj @@ -10,4 +10,8 @@ + + + + From b8bca4f85490f50c8847ca6cb0faa10b9a62a454 Mon Sep 17 00:00:00 2001 From: manuelalonsoperez Date: Tue, 1 Oct 2019 10:41:57 +0200 Subject: [PATCH 04/21] =?UTF-8?q?St=C3=B8tter=20opprettelse=20av=20Archive?= =?UTF-8?q?Client?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Eksponerer Core til Archive og ArchiveTests - Legger til avhengigheter for å støtte logging --- .../ArchiveClientTests.cs | 27 +++++++++++++++++++ ....Signature.Api.Client.Archive.Tests.csproj | 14 ++++++---- .../ArchiveClient.cs | 25 +++++++++++++++++ ...gipost.Signature.Api.Client.Archive.csproj | 13 +++++++++ .../Properties/ProjectAssemblyInfo.cs | 4 ++- 5 files changed, 77 insertions(+), 6 deletions(-) create mode 100644 Digipost.Signature.Api.Client.Archive.Tests/ArchiveClientTests.cs create mode 100644 Digipost.Signature.Api.Client.Archive/ArchiveClient.cs diff --git a/Digipost.Signature.Api.Client.Archive.Tests/ArchiveClientTests.cs b/Digipost.Signature.Api.Client.Archive.Tests/ArchiveClientTests.cs new file mode 100644 index 00000000..064dcf6c --- /dev/null +++ b/Digipost.Signature.Api.Client.Archive.Tests/ArchiveClientTests.cs @@ -0,0 +1,27 @@ +using Xunit; +using static Digipost.Signature.Api.Client.Core.Tests.Utilities.CoreDomainUtility; + + +namespace Digipost.Signature.Api.Client.Archive.Tests +{ + public class ArchiveClientTests + { + public class ConstructorMethod : ArchiveClientTests + { + [Fact] + public void Simple_constructor() + { + //Arrange + var clientConfiguration = GetClientConfiguration(); + + //Act + var client = new ArchiveClient(clientConfiguration); + + //Assert + Assert.Equal(clientConfiguration, client.ClientConfiguration); + Assert.NotNull(client.HttpClient); + } + + } + } +} diff --git a/Digipost.Signature.Api.Client.Archive.Tests/Digipost.Signature.Api.Client.Archive.Tests.csproj b/Digipost.Signature.Api.Client.Archive.Tests/Digipost.Signature.Api.Client.Archive.Tests.csproj index 2a24d275..5871218f 100644 --- a/Digipost.Signature.Api.Client.Archive.Tests/Digipost.Signature.Api.Client.Archive.Tests.csproj +++ b/Digipost.Signature.Api.Client.Archive.Tests/Digipost.Signature.Api.Client.Archive.Tests.csproj @@ -1,17 +1,21 @@ - + false - - - + + + - + + + + + diff --git a/Digipost.Signature.Api.Client.Archive/ArchiveClient.cs b/Digipost.Signature.Api.Client.Archive/ArchiveClient.cs new file mode 100644 index 00000000..a5ee8021 --- /dev/null +++ b/Digipost.Signature.Api.Client.Archive/ArchiveClient.cs @@ -0,0 +1,25 @@ +using System; +using System.IO; +using System.Threading.Tasks; +using Digipost.Signature.Api.Client.Core; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Abstractions; + +namespace Digipost.Signature.Api.Client.Archive +{ + public class ArchiveClient : BaseClient + { + private readonly ILogger _logger; + + public ArchiveClient(ClientConfiguration clientConfiguration) + : this(clientConfiguration, new NullLoggerFactory()) + { + } + + public ArchiveClient(ClientConfiguration clientConfiguration, ILoggerFactory loggerFactory) + : base(clientConfiguration, loggerFactory) + { + _logger = loggerFactory.CreateLogger(); + } + } +} diff --git a/Digipost.Signature.Api.Client.Archive/Digipost.Signature.Api.Client.Archive.csproj b/Digipost.Signature.Api.Client.Archive/Digipost.Signature.Api.Client.Archive.csproj index 6cc2c134..7411c783 100644 --- a/Digipost.Signature.Api.Client.Archive/Digipost.Signature.Api.Client.Archive.csproj +++ b/Digipost.Signature.Api.Client.Archive/Digipost.Signature.Api.Client.Archive.csproj @@ -5,4 +5,17 @@ Digipost.Signature.Api.Client.Archive + + + + + + + + + + + + + diff --git a/Digipost.Signature.Api.Client.Core/Properties/ProjectAssemblyInfo.cs b/Digipost.Signature.Api.Client.Core/Properties/ProjectAssemblyInfo.cs index f99f850e..4d24df54 100755 --- a/Digipost.Signature.Api.Client.Core/Properties/ProjectAssemblyInfo.cs +++ b/Digipost.Signature.Api.Client.Core/Properties/ProjectAssemblyInfo.cs @@ -5,7 +5,9 @@ [assembly: ComVisible(false)] [assembly: InternalsVisibleTo("Digipost.Signature.Api.Client.Portal")] [assembly: InternalsVisibleTo("Digipost.Signature.Api.Client.Direct")] +[assembly: InternalsVisibleTo("Digipost.Signature.Api.Client.Archive")] [assembly: InternalsVisibleTo("Digipost.Signature.Api.Client.Program")] [assembly: InternalsVisibleTo("Digipost.Signature.Api.Client.Core.Tests")] -[assembly: InternalsVisibleTo("Digipost.Signature.Api.Client.Direct.Tests")] [assembly: InternalsVisibleTo("Digipost.Signature.Api.Client.Portal.Tests")] +[assembly: InternalsVisibleTo("Digipost.Signature.Api.Client.Direct.Tests")] +[assembly: InternalsVisibleTo("Digipost.Signature.Api.Client.Archive.Tests")] From ce0808f5be55fdf32a3d000565e2c6b0037124f1 Mon Sep 17 00:00:00 2001 From: manuelalonsoperez Date: Thu, 3 Oct 2019 13:21:44 +0200 Subject: [PATCH 05/21] Archive client test og testhelper --- .../ArchiveClientTests.cs | 27 ---------- ....Signature.Api.Client.Archive.Tests.csproj | 13 ++--- .../Smoke/ArchiveSmokeTests.cs | 52 +++++++++++++++++++ .../Smoke/TestHelper.cs | 23 ++++++++ .../ArchiveClient.cs | 6 +++ ...ost.Signature.Api.Client.Core.Tests.csproj | 6 +-- .../FakeHttpClientHandlerForPadesResponse.cs | 15 ++++++ .../Properties/ProjectAssemblyInfo.cs | 4 +- .../Smoke/TestHelper.cs | 1 + 9 files changed, 107 insertions(+), 40 deletions(-) delete mode 100644 Digipost.Signature.Api.Client.Archive.Tests/ArchiveClientTests.cs create mode 100644 Digipost.Signature.Api.Client.Archive.Tests/Smoke/ArchiveSmokeTests.cs create mode 100644 Digipost.Signature.Api.Client.Archive.Tests/Smoke/TestHelper.cs create mode 100644 Digipost.Signature.Api.Client.Core.Tests/Fakes/FakeHttpClientHandlerForPadesResponse.cs diff --git a/Digipost.Signature.Api.Client.Archive.Tests/ArchiveClientTests.cs b/Digipost.Signature.Api.Client.Archive.Tests/ArchiveClientTests.cs deleted file mode 100644 index 064dcf6c..00000000 --- a/Digipost.Signature.Api.Client.Archive.Tests/ArchiveClientTests.cs +++ /dev/null @@ -1,27 +0,0 @@ -using Xunit; -using static Digipost.Signature.Api.Client.Core.Tests.Utilities.CoreDomainUtility; - - -namespace Digipost.Signature.Api.Client.Archive.Tests -{ - public class ArchiveClientTests - { - public class ConstructorMethod : ArchiveClientTests - { - [Fact] - public void Simple_constructor() - { - //Arrange - var clientConfiguration = GetClientConfiguration(); - - //Act - var client = new ArchiveClient(clientConfiguration); - - //Assert - Assert.Equal(clientConfiguration, client.ClientConfiguration); - Assert.NotNull(client.HttpClient); - } - - } - } -} diff --git a/Digipost.Signature.Api.Client.Archive.Tests/Digipost.Signature.Api.Client.Archive.Tests.csproj b/Digipost.Signature.Api.Client.Archive.Tests/Digipost.Signature.Api.Client.Archive.Tests.csproj index 5871218f..c848ede6 100644 --- a/Digipost.Signature.Api.Client.Archive.Tests/Digipost.Signature.Api.Client.Archive.Tests.csproj +++ b/Digipost.Signature.Api.Client.Archive.Tests/Digipost.Signature.Api.Client.Archive.Tests.csproj @@ -5,17 +5,14 @@ - - - + + + - - - - - + + diff --git a/Digipost.Signature.Api.Client.Archive.Tests/Smoke/ArchiveSmokeTests.cs b/Digipost.Signature.Api.Client.Archive.Tests/Smoke/ArchiveSmokeTests.cs new file mode 100644 index 00000000..f4a9e9bc --- /dev/null +++ b/Digipost.Signature.Api.Client.Archive.Tests/Smoke/ArchiveSmokeTests.cs @@ -0,0 +1,52 @@ +using Digipost.Signature.Api.Client.Core; +using Digipost.Signature.Api.Client.Core.Tests.Smoke; +using Digipost.Signature.Api.Client.Core.Utilities; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using Xunit; +using static Digipost.Signature.Api.Client.Core.Tests.Utilities.CoreDomainUtility; + + +namespace Digipost.Signature.Api.Client.Archive.Tests.Smoke +{ + public class ArchiveSmokeTestsFixture : SmokeTests + { + public ArchiveSmokeTestsFixture() + { + TestHelper = new TestHelper(ArchiveClient(Endpoint)); + } + + public TestHelper TestHelper { get; } + private static ArchiveClient ArchiveClient(Environment environment) + { + var serviceProvider = LoggingUtility.CreateServiceProviderAndSetUpLogging(); + + var clientConfig = new ClientConfiguration(environment, GetBringCertificate(), new Sender(BringPublicOrganizationNumber)) + { + LogRequestAndResponse = true + }; + var client = new ArchiveClient(clientConfig, serviceProvider.GetService()); + + return client; + } + } + + public class ArchiveClientSmokeTests : IClassFixture + { + public ArchiveClientSmokeTests(ArchiveSmokeTestsFixture fixture) + { + _fixture = fixture; + } + + private readonly ArchiveSmokeTestsFixture _fixture; + + [Fact] + public void Can_download_pades() + { + _fixture.TestHelper + .Get_PAdES("123"); + + } + } + +} diff --git a/Digipost.Signature.Api.Client.Archive.Tests/Smoke/TestHelper.cs b/Digipost.Signature.Api.Client.Archive.Tests/Smoke/TestHelper.cs new file mode 100644 index 00000000..b56b9db4 --- /dev/null +++ b/Digipost.Signature.Api.Client.Archive.Tests/Smoke/TestHelper.cs @@ -0,0 +1,23 @@ +using Digipost.Signature.Api.Client.Core.Tests.Smoke; +using Xunit; + +namespace Digipost.Signature.Api.Client.Archive.Tests.Smoke +{ + public class TestHelper : TestHelperBase + { + private readonly ArchiveClient _archiveClient; + + public TestHelper(ArchiveClient archiveClient) + { + _archiveClient = archiveClient; + } + + public TestHelper Get_PAdES(string reference) + { + var pades = _archiveClient.GetPades(reference).Result; + Assert.True(pades.CanRead); + return this; + } + } + +} diff --git a/Digipost.Signature.Api.Client.Archive/ArchiveClient.cs b/Digipost.Signature.Api.Client.Archive/ArchiveClient.cs index a5ee8021..6cb649ea 100644 --- a/Digipost.Signature.Api.Client.Archive/ArchiveClient.cs +++ b/Digipost.Signature.Api.Client.Archive/ArchiveClient.cs @@ -21,5 +21,11 @@ public ArchiveClient(ClientConfiguration clientConfiguration, ILoggerFactory log { _logger = loggerFactory.CreateLogger(); } + + public async Task GetPades(string padesReference) + { + var uri = new Uri("https://api.test.signering.posten.no/api/988015814/archive/documents/" + padesReference + "/pades"); + return await RequestHelper.GetStream(uri).ConfigureAwait(false); + } } } diff --git a/Digipost.Signature.Api.Client.Core.Tests/Digipost.Signature.Api.Client.Core.Tests.csproj b/Digipost.Signature.Api.Client.Core.Tests/Digipost.Signature.Api.Client.Core.Tests.csproj index 6387faec..3e979215 100644 --- a/Digipost.Signature.Api.Client.Core.Tests/Digipost.Signature.Api.Client.Core.Tests.csproj +++ b/Digipost.Signature.Api.Client.Core.Tests/Digipost.Signature.Api.Client.Core.Tests.csproj @@ -3,8 +3,8 @@ - - + + @@ -12,7 +12,7 @@ - + diff --git a/Digipost.Signature.Api.Client.Core.Tests/Fakes/FakeHttpClientHandlerForPadesResponse.cs b/Digipost.Signature.Api.Client.Core.Tests/Fakes/FakeHttpClientHandlerForPadesResponse.cs new file mode 100644 index 00000000..761d388e --- /dev/null +++ b/Digipost.Signature.Api.Client.Core.Tests/Fakes/FakeHttpClientHandlerForPadesResponse.cs @@ -0,0 +1,15 @@ +using System.IO; +using System.Net.Http; +using System.Text; + +namespace Digipost.Signature.Api.Client.Core.Tests.Fakes +{ + public class FakeHttpClientHandlerForPadesResponse : FakeHttpClientHandlerResponse + { + public override HttpContent GetContent() + { + var stream = new MemoryStream(Encoding.UTF8.GetBytes("Manuel er kul")); + return new StreamContent(stream); + } + } +} diff --git a/Digipost.Signature.Api.Client.Core.Tests/Properties/ProjectAssemblyInfo.cs b/Digipost.Signature.Api.Client.Core.Tests/Properties/ProjectAssemblyInfo.cs index a4b4feaf..c43094c6 100755 --- a/Digipost.Signature.Api.Client.Core.Tests/Properties/ProjectAssemblyInfo.cs +++ b/Digipost.Signature.Api.Client.Core.Tests/Properties/ProjectAssemblyInfo.cs @@ -1,7 +1,7 @@ -using System.Reflection; -using System.Runtime.CompilerServices; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: ComVisible(false)] +[assembly: InternalsVisibleTo("Digipost.Signature.Api.Client.Archive.Tests")] [assembly: InternalsVisibleTo("Digipost.Signature.Api.Client.Direct.Tests")] [assembly: InternalsVisibleTo("Digipost.Signature.Api.Client.Portal.Tests")] diff --git a/Digipost.Signature.Api.Client.Direct.Tests/Smoke/TestHelper.cs b/Digipost.Signature.Api.Client.Direct.Tests/Smoke/TestHelper.cs index 14071e63..2e4bcc64 100644 --- a/Digipost.Signature.Api.Client.Direct.Tests/Smoke/TestHelper.cs +++ b/Digipost.Signature.Api.Client.Direct.Tests/Smoke/TestHelper.cs @@ -155,6 +155,7 @@ public TestHelper Get_PAdES() { Assert_state(_status); + Console.WriteLine(_status.References.Pades); var pades = _directClient.GetPades(_status.References.Pades).Result; Assert.True(pades.CanRead); return this; From 335a515df4922ebf0406c5232b2b9f0822c9bc69 Mon Sep 17 00:00:00 2001 From: manuelalonsoperez Date: Thu, 3 Oct 2019 15:09:04 +0200 Subject: [PATCH 06/21] Testet OK ved henting av feil dokument_id --- .../Smoke/ArchiveSmokeTests.cs | 5 ++--- .../Smoke/TestHelper.cs | 8 +++++++- Digipost.Signature.Api.Client.Archive/ArchiveClient.cs | 6 ++++-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Digipost.Signature.Api.Client.Archive.Tests/Smoke/ArchiveSmokeTests.cs b/Digipost.Signature.Api.Client.Archive.Tests/Smoke/ArchiveSmokeTests.cs index f4a9e9bc..896a3999 100644 --- a/Digipost.Signature.Api.Client.Archive.Tests/Smoke/ArchiveSmokeTests.cs +++ b/Digipost.Signature.Api.Client.Archive.Tests/Smoke/ArchiveSmokeTests.cs @@ -41,11 +41,10 @@ public ArchiveClientSmokeTests(ArchiveSmokeTestsFixture fixture) private readonly ArchiveSmokeTestsFixture _fixture; [Fact] - public void Can_download_pades() + public void download_pades_and_expect_server_error() { _fixture.TestHelper - .Get_PAdES("123"); - + .Download_pades_and_expect_server_error("1234"); } } diff --git a/Digipost.Signature.Api.Client.Archive.Tests/Smoke/TestHelper.cs b/Digipost.Signature.Api.Client.Archive.Tests/Smoke/TestHelper.cs index b56b9db4..d3286942 100644 --- a/Digipost.Signature.Api.Client.Archive.Tests/Smoke/TestHelper.cs +++ b/Digipost.Signature.Api.Client.Archive.Tests/Smoke/TestHelper.cs @@ -1,12 +1,13 @@ +using System; using Digipost.Signature.Api.Client.Core.Tests.Smoke; using Xunit; +using Xunit.Sdk; namespace Digipost.Signature.Api.Client.Archive.Tests.Smoke { public class TestHelper : TestHelperBase { private readonly ArchiveClient _archiveClient; - public TestHelper(ArchiveClient archiveClient) { _archiveClient = archiveClient; @@ -18,6 +19,11 @@ public TestHelper Get_PAdES(string reference) Assert.True(pades.CanRead); return this; } + + public void Download_pades_and_expect_server_error(string archivedDocumentId) + { + Assert.Throws(() => Get_PAdES(archivedDocumentId)); + } } } diff --git a/Digipost.Signature.Api.Client.Archive/ArchiveClient.cs b/Digipost.Signature.Api.Client.Archive/ArchiveClient.cs index 6cb649ea..51948a53 100644 --- a/Digipost.Signature.Api.Client.Archive/ArchiveClient.cs +++ b/Digipost.Signature.Api.Client.Archive/ArchiveClient.cs @@ -22,9 +22,11 @@ public ArchiveClient(ClientConfiguration clientConfiguration, ILoggerFactory log _logger = loggerFactory.CreateLogger(); } - public async Task GetPades(string padesReference) + public async Task GetPades(string archivedDocumentId) { - var uri = new Uri("https://api.test.signering.posten.no/api/988015814/archive/documents/" + padesReference + "/pades"); + var orgNummer = ClientConfiguration.GlobalSender.OrganizationNumber; + var environment = ClientConfiguration.Environment.Url.ToString(); + var uri = new Uri(environment + "api/" + orgNummer + "/archive/documents/" + archivedDocumentId + "/pades"); return await RequestHelper.GetStream(uri).ConfigureAwait(false); } } From 1353fba3354c5dd0d3a20f7d9eb84adb1b3322a9 Mon Sep 17 00:00:00 2001 From: manuelalonsoperez Date: Thu, 3 Oct 2019 15:50:44 +0200 Subject: [PATCH 07/21] Testhelper fanger inner exception --- .../Smoke/TestHelper.cs | 21 +++++++++++++++++-- .../ArchiveClient.cs | 2 +- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/Digipost.Signature.Api.Client.Archive.Tests/Smoke/TestHelper.cs b/Digipost.Signature.Api.Client.Archive.Tests/Smoke/TestHelper.cs index d3286942..858d1f59 100644 --- a/Digipost.Signature.Api.Client.Archive.Tests/Smoke/TestHelper.cs +++ b/Digipost.Signature.Api.Client.Archive.Tests/Smoke/TestHelper.cs @@ -1,7 +1,7 @@ using System; +using Digipost.Signature.Api.Client.Core.Exceptions; using Digipost.Signature.Api.Client.Core.Tests.Smoke; using Xunit; -using Xunit.Sdk; namespace Digipost.Signature.Api.Client.Archive.Tests.Smoke { @@ -22,7 +22,24 @@ public TestHelper Get_PAdES(string reference) public void Download_pades_and_expect_server_error(string archivedDocumentId) { - Assert.Throws(() => Get_PAdES(archivedDocumentId)); + try + { + Get_PAdES(archivedDocumentId); + } + catch (AggregateException ex) + { + if(ex.InnerException is UnexpectedResponseException) + { + UnexpectedResponseException exception = (UnexpectedResponseException) ex.InnerException; + Assert.Equal(exception.Error.Code, "ARCHIVED_DOCUMENT_NOT_FOUND"); + } + else + { + Assert.True(false, $"Expected UnexpectedResponseException, but found {ex.InnerException.GetType().Name}."); + } + } + + } } diff --git a/Digipost.Signature.Api.Client.Archive/ArchiveClient.cs b/Digipost.Signature.Api.Client.Archive/ArchiveClient.cs index 51948a53..73b682c6 100644 --- a/Digipost.Signature.Api.Client.Archive/ArchiveClient.cs +++ b/Digipost.Signature.Api.Client.Archive/ArchiveClient.cs @@ -26,7 +26,7 @@ public async Task GetPades(string archivedDocumentId) { var orgNummer = ClientConfiguration.GlobalSender.OrganizationNumber; var environment = ClientConfiguration.Environment.Url.ToString(); - var uri = new Uri(environment + "api/" + orgNummer + "/archive/documents/" + archivedDocumentId + "/pades"); + var uri = new Uri($"{environment}api/{orgNummer}/archive/documents/{archivedDocumentId}/pades"); return await RequestHelper.GetStream(uri).ConfigureAwait(false); } } From f9c5758bfb2cc51079be5aa2efc5a3e083fa5529 Mon Sep 17 00:00:00 2001 From: manuelalonsoperez Date: Thu, 3 Oct 2019 15:56:41 +0200 Subject: [PATCH 08/21] =?UTF-8?q?Fjerne=20un=C3=B8dvendig=20kode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...igipost.Signature.Api.Client.Core.Tests.csproj | 3 +++ .../FakeHttpClientHandlerForPadesResponse.cs | 15 --------------- 2 files changed, 3 insertions(+), 15 deletions(-) delete mode 100644 Digipost.Signature.Api.Client.Core.Tests/Fakes/FakeHttpClientHandlerForPadesResponse.cs diff --git a/Digipost.Signature.Api.Client.Core.Tests/Digipost.Signature.Api.Client.Core.Tests.csproj b/Digipost.Signature.Api.Client.Core.Tests/Digipost.Signature.Api.Client.Core.Tests.csproj index 3e979215..4d4fb08e 100644 --- a/Digipost.Signature.Api.Client.Core.Tests/Digipost.Signature.Api.Client.Core.Tests.csproj +++ b/Digipost.Signature.Api.Client.Core.Tests/Digipost.Signature.Api.Client.Core.Tests.csproj @@ -35,5 +35,8 @@ + + + \ No newline at end of file diff --git a/Digipost.Signature.Api.Client.Core.Tests/Fakes/FakeHttpClientHandlerForPadesResponse.cs b/Digipost.Signature.Api.Client.Core.Tests/Fakes/FakeHttpClientHandlerForPadesResponse.cs deleted file mode 100644 index 761d388e..00000000 --- a/Digipost.Signature.Api.Client.Core.Tests/Fakes/FakeHttpClientHandlerForPadesResponse.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.IO; -using System.Net.Http; -using System.Text; - -namespace Digipost.Signature.Api.Client.Core.Tests.Fakes -{ - public class FakeHttpClientHandlerForPadesResponse : FakeHttpClientHandlerResponse - { - public override HttpContent GetContent() - { - var stream = new MemoryStream(Encoding.UTF8.GetBytes("Manuel er kul")); - return new StreamContent(stream); - } - } -} From b19c3a7d310073d86c2b9d5780aa55eb7ff1e0bf Mon Sep 17 00:00:00 2001 From: manuelalonsoperez Date: Fri, 4 Oct 2019 13:17:56 +0200 Subject: [PATCH 09/21] Ny DocumentOwner --- .../Smoke/ArchiveSmokeTests.cs | 5 ++--- .../Smoke/TestHelper.cs | 9 +++++---- .../ArchiveClient.cs | 7 +++---- .../Digipost.Signature.Api.Client.Archive.csproj | 8 ++++---- .../DocumentOwner.cs | 12 ++++++++++++ Digipost.Signature.Api.Client.Core/BaseClient.cs | 2 +- 6 files changed, 27 insertions(+), 16 deletions(-) create mode 100644 Digipost.Signature.Api.Client.Archive/DocumentOwner.cs diff --git a/Digipost.Signature.Api.Client.Archive.Tests/Smoke/ArchiveSmokeTests.cs b/Digipost.Signature.Api.Client.Archive.Tests/Smoke/ArchiveSmokeTests.cs index 896a3999..edce57ad 100644 --- a/Digipost.Signature.Api.Client.Archive.Tests/Smoke/ArchiveSmokeTests.cs +++ b/Digipost.Signature.Api.Client.Archive.Tests/Smoke/ArchiveSmokeTests.cs @@ -15,7 +15,6 @@ public ArchiveSmokeTestsFixture() { TestHelper = new TestHelper(ArchiveClient(Endpoint)); } - public TestHelper TestHelper { get; } private static ArchiveClient ArchiveClient(Environment environment) { @@ -41,10 +40,10 @@ public ArchiveClientSmokeTests(ArchiveSmokeTestsFixture fixture) private readonly ArchiveSmokeTestsFixture _fixture; [Fact] - public void download_pades_and_expect_server_error() + public void download_pades_and_expect_error() { _fixture.TestHelper - .Download_pades_and_expect_server_error("1234"); + .Download_pades_and_expect_client_error(GetClientConfiguration().GlobalSender.OrganizationNumber,"1234"); } } diff --git a/Digipost.Signature.Api.Client.Archive.Tests/Smoke/TestHelper.cs b/Digipost.Signature.Api.Client.Archive.Tests/Smoke/TestHelper.cs index 858d1f59..98f6e80d 100644 --- a/Digipost.Signature.Api.Client.Archive.Tests/Smoke/TestHelper.cs +++ b/Digipost.Signature.Api.Client.Archive.Tests/Smoke/TestHelper.cs @@ -13,18 +13,19 @@ public TestHelper(ArchiveClient archiveClient) _archiveClient = archiveClient; } - public TestHelper Get_PAdES(string reference) + public TestHelper Get_PAdES(string documentOwner, string reference) { - var pades = _archiveClient.GetPades(reference).Result; + DocumentOwner owner = new DocumentOwner(documentOwner); + var pades = _archiveClient.GetPades(owner, reference).Result; Assert.True(pades.CanRead); return this; } - public void Download_pades_and_expect_server_error(string archivedDocumentId) + public void Download_pades_and_expect_client_error(string archiveDocumentOwner, string archiveDocumentId) { try { - Get_PAdES(archivedDocumentId); + Get_PAdES(archiveDocumentOwner, archiveDocumentId); } catch (AggregateException ex) { diff --git a/Digipost.Signature.Api.Client.Archive/ArchiveClient.cs b/Digipost.Signature.Api.Client.Archive/ArchiveClient.cs index 73b682c6..f414ed55 100644 --- a/Digipost.Signature.Api.Client.Archive/ArchiveClient.cs +++ b/Digipost.Signature.Api.Client.Archive/ArchiveClient.cs @@ -4,6 +4,7 @@ using Digipost.Signature.Api.Client.Core; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; +using Environment = Digipost.Signature.Api.Client.Core.Environment; namespace Digipost.Signature.Api.Client.Archive { @@ -22,11 +23,9 @@ public ArchiveClient(ClientConfiguration clientConfiguration, ILoggerFactory log _logger = loggerFactory.CreateLogger(); } - public async Task GetPades(string archivedDocumentId) + public async Task GetPades(DocumentOwner owner, string archiveDocumentId) { - var orgNummer = ClientConfiguration.GlobalSender.OrganizationNumber; - var environment = ClientConfiguration.Environment.Url.ToString(); - var uri = new Uri($"{environment}api/{orgNummer}/archive/documents/{archivedDocumentId}/pades"); + var uri = new Uri($"{ClientConfiguration.Environment.Url}api/{owner.OrganizationNumber}/archive/documents/{archiveDocumentId}/pades"); return await RequestHelper.GetStream(uri).ConfigureAwait(false); } } diff --git a/Digipost.Signature.Api.Client.Archive/Digipost.Signature.Api.Client.Archive.csproj b/Digipost.Signature.Api.Client.Archive/Digipost.Signature.Api.Client.Archive.csproj index 7411c783..303c48df 100644 --- a/Digipost.Signature.Api.Client.Archive/Digipost.Signature.Api.Client.Archive.csproj +++ b/Digipost.Signature.Api.Client.Archive/Digipost.Signature.Api.Client.Archive.csproj @@ -8,14 +8,14 @@ - - + + - + - + diff --git a/Digipost.Signature.Api.Client.Archive/DocumentOwner.cs b/Digipost.Signature.Api.Client.Archive/DocumentOwner.cs new file mode 100644 index 00000000..88430325 --- /dev/null +++ b/Digipost.Signature.Api.Client.Archive/DocumentOwner.cs @@ -0,0 +1,12 @@ +namespace Digipost.Signature.Api.Client.Archive +{ + public class DocumentOwner + { + public DocumentOwner(string organizationNumber) + { + OrganizationNumber = organizationNumber; + } + + public string OrganizationNumber { get; set; } + } +} diff --git a/Digipost.Signature.Api.Client.Core/BaseClient.cs b/Digipost.Signature.Api.Client.Core/BaseClient.cs index 256d4070..d3e964be 100644 --- a/Digipost.Signature.Api.Client.Core/BaseClient.cs +++ b/Digipost.Signature.Api.Client.Core/BaseClient.cs @@ -65,7 +65,7 @@ protected Sender CurrentSender(Sender jobSender) return sender; } - private void ValidateSenderCertificateThrowIfInvalid() + internal void ValidateSenderCertificateThrowIfInvalid() { var validationResult = CertificateValidator.ValidateCertificateAndChain(ClientConfiguration.Certificate, ClientConfiguration.Environment.AllowedChainCertificates); From 4b64159b8c7bec84bd9961eb99fc52241c663715 Mon Sep 17 00:00:00 2001 From: manuelalonsoperez Date: Mon, 7 Oct 2019 13:27:56 +0200 Subject: [PATCH 10/21] Nytt ArchiveDocumentId object --- .../Smoke/ArchiveSmokeTests.cs | 7 +++++-- .../Smoke/TestHelper.cs | 18 +++++++++++------- .../ArchiveClient.cs | 5 ++--- .../ArchiveDocumentId.cs | 11 +++++++++++ ...ocumentOwner.cs => ArchiveDocumentOwner.cs} | 0 5 files changed, 29 insertions(+), 12 deletions(-) create mode 100644 Digipost.Signature.Api.Client.Archive/ArchiveDocumentId.cs rename Digipost.Signature.Api.Client.Archive/{DocumentOwner.cs => ArchiveDocumentOwner.cs} (100%) diff --git a/Digipost.Signature.Api.Client.Archive.Tests/Smoke/ArchiveSmokeTests.cs b/Digipost.Signature.Api.Client.Archive.Tests/Smoke/ArchiveSmokeTests.cs index edce57ad..805fd358 100644 --- a/Digipost.Signature.Api.Client.Archive.Tests/Smoke/ArchiveSmokeTests.cs +++ b/Digipost.Signature.Api.Client.Archive.Tests/Smoke/ArchiveSmokeTests.cs @@ -11,9 +11,12 @@ namespace Digipost.Signature.Api.Client.Archive.Tests.Smoke { public class ArchiveSmokeTestsFixture : SmokeTests { + private readonly ArchiveDocumentId _documentId = new ArchiveDocumentId("1234"); + private readonly DocumentOwner _documentOwner = new DocumentOwner(GetClientConfiguration().GlobalSender.OrganizationNumber); + public ArchiveSmokeTestsFixture() { - TestHelper = new TestHelper(ArchiveClient(Endpoint)); + TestHelper = new TestHelper(ArchiveClient(Endpoint), _documentOwner,_documentId); } public TestHelper TestHelper { get; } private static ArchiveClient ArchiveClient(Environment environment) @@ -43,7 +46,7 @@ public ArchiveClientSmokeTests(ArchiveSmokeTestsFixture fixture) public void download_pades_and_expect_error() { _fixture.TestHelper - .Download_pades_and_expect_client_error(GetClientConfiguration().GlobalSender.OrganizationNumber,"1234"); + .Download_pades_and_expect_client_error(); } } diff --git a/Digipost.Signature.Api.Client.Archive.Tests/Smoke/TestHelper.cs b/Digipost.Signature.Api.Client.Archive.Tests/Smoke/TestHelper.cs index 98f6e80d..0377018c 100644 --- a/Digipost.Signature.Api.Client.Archive.Tests/Smoke/TestHelper.cs +++ b/Digipost.Signature.Api.Client.Archive.Tests/Smoke/TestHelper.cs @@ -1,4 +1,5 @@ using System; +using System.Reflection.Metadata; using Digipost.Signature.Api.Client.Core.Exceptions; using Digipost.Signature.Api.Client.Core.Tests.Smoke; using Xunit; @@ -8,31 +9,34 @@ namespace Digipost.Signature.Api.Client.Archive.Tests.Smoke public class TestHelper : TestHelperBase { private readonly ArchiveClient _archiveClient; - public TestHelper(ArchiveClient archiveClient) + private readonly DocumentOwner _documentOwner; + private readonly ArchiveDocumentId _documentId; + public TestHelper(ArchiveClient archiveClient, DocumentOwner documentOwner, ArchiveDocumentId documentId) { _archiveClient = archiveClient; + _documentOwner = documentOwner; + _documentId = documentId; } - public TestHelper Get_PAdES(string documentOwner, string reference) + public TestHelper Get_PAdES() { - DocumentOwner owner = new DocumentOwner(documentOwner); - var pades = _archiveClient.GetPades(owner, reference).Result; + var pades = _archiveClient.GetPades(_documentOwner, _documentId).Result; Assert.True(pades.CanRead); return this; } - public void Download_pades_and_expect_client_error(string archiveDocumentOwner, string archiveDocumentId) + public void Download_pades_and_expect_client_error() { try { - Get_PAdES(archiveDocumentOwner, archiveDocumentId); + Get_PAdES(); } catch (AggregateException ex) { if(ex.InnerException is UnexpectedResponseException) { UnexpectedResponseException exception = (UnexpectedResponseException) ex.InnerException; - Assert.Equal(exception.Error.Code, "ARCHIVED_DOCUMENT_NOT_FOUND"); + Assert.Equal("ARCHIVED_DOCUMENT_NOT_FOUND", exception.Error.Code); } else { diff --git a/Digipost.Signature.Api.Client.Archive/ArchiveClient.cs b/Digipost.Signature.Api.Client.Archive/ArchiveClient.cs index f414ed55..aa4d0d6a 100644 --- a/Digipost.Signature.Api.Client.Archive/ArchiveClient.cs +++ b/Digipost.Signature.Api.Client.Archive/ArchiveClient.cs @@ -4,7 +4,6 @@ using Digipost.Signature.Api.Client.Core; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; -using Environment = Digipost.Signature.Api.Client.Core.Environment; namespace Digipost.Signature.Api.Client.Archive { @@ -23,9 +22,9 @@ public ArchiveClient(ClientConfiguration clientConfiguration, ILoggerFactory log _logger = loggerFactory.CreateLogger(); } - public async Task GetPades(DocumentOwner owner, string archiveDocumentId) + public async Task GetPades(DocumentOwner owner, ArchiveDocumentId documentId) { - var uri = new Uri($"{ClientConfiguration.Environment.Url}api/{owner.OrganizationNumber}/archive/documents/{archiveDocumentId}/pades"); + var uri = new Uri($"{ClientConfiguration.Environment.Url}api/{owner.OrganizationNumber}/archive/documents/{documentId.DocumentId}/pades"); return await RequestHelper.GetStream(uri).ConfigureAwait(false); } } diff --git a/Digipost.Signature.Api.Client.Archive/ArchiveDocumentId.cs b/Digipost.Signature.Api.Client.Archive/ArchiveDocumentId.cs new file mode 100644 index 00000000..10cbec84 --- /dev/null +++ b/Digipost.Signature.Api.Client.Archive/ArchiveDocumentId.cs @@ -0,0 +1,11 @@ +namespace Digipost.Signature.Api.Client.Archive +{ + public class ArchiveDocumentId + { + public ArchiveDocumentId(string archiveDocumentId) + { + DocumentId = archiveDocumentId; + } + public string DocumentId { get; set; } + } +} diff --git a/Digipost.Signature.Api.Client.Archive/DocumentOwner.cs b/Digipost.Signature.Api.Client.Archive/ArchiveDocumentOwner.cs similarity index 100% rename from Digipost.Signature.Api.Client.Archive/DocumentOwner.cs rename to Digipost.Signature.Api.Client.Archive/ArchiveDocumentOwner.cs From a0bbfba7160041613e6a6d9719f51a600215d67f Mon Sep 17 00:00:00 2001 From: manuelalonsoperez Date: Tue, 8 Oct 2019 12:04:25 +0200 Subject: [PATCH 11/21] Test helper instanser sine variabler --- .../Smoke/ArchiveSmokeTests.cs | 5 +---- .../Smoke/TestHelper.cs | 11 +++++------ .../ArchiveClient.cs | 4 ++-- .../ArchiveDocument.cs | 11 +++++++++++ .../ArchiveDocumentId.cs | 11 ----------- .../ArchiveDocumentOwner.cs | 2 +- 6 files changed, 20 insertions(+), 24 deletions(-) create mode 100644 Digipost.Signature.Api.Client.Archive/ArchiveDocument.cs delete mode 100644 Digipost.Signature.Api.Client.Archive/ArchiveDocumentId.cs diff --git a/Digipost.Signature.Api.Client.Archive.Tests/Smoke/ArchiveSmokeTests.cs b/Digipost.Signature.Api.Client.Archive.Tests/Smoke/ArchiveSmokeTests.cs index 805fd358..239e4ab7 100644 --- a/Digipost.Signature.Api.Client.Archive.Tests/Smoke/ArchiveSmokeTests.cs +++ b/Digipost.Signature.Api.Client.Archive.Tests/Smoke/ArchiveSmokeTests.cs @@ -11,12 +11,9 @@ namespace Digipost.Signature.Api.Client.Archive.Tests.Smoke { public class ArchiveSmokeTestsFixture : SmokeTests { - private readonly ArchiveDocumentId _documentId = new ArchiveDocumentId("1234"); - private readonly DocumentOwner _documentOwner = new DocumentOwner(GetClientConfiguration().GlobalSender.OrganizationNumber); - public ArchiveSmokeTestsFixture() { - TestHelper = new TestHelper(ArchiveClient(Endpoint), _documentOwner,_documentId); + TestHelper = new TestHelper(ArchiveClient(Endpoint)); } public TestHelper TestHelper { get; } private static ArchiveClient ArchiveClient(Environment environment) diff --git a/Digipost.Signature.Api.Client.Archive.Tests/Smoke/TestHelper.cs b/Digipost.Signature.Api.Client.Archive.Tests/Smoke/TestHelper.cs index 0377018c..f283b4ff 100644 --- a/Digipost.Signature.Api.Client.Archive.Tests/Smoke/TestHelper.cs +++ b/Digipost.Signature.Api.Client.Archive.Tests/Smoke/TestHelper.cs @@ -1,5 +1,4 @@ using System; -using System.Reflection.Metadata; using Digipost.Signature.Api.Client.Core.Exceptions; using Digipost.Signature.Api.Client.Core.Tests.Smoke; using Xunit; @@ -10,17 +9,17 @@ public class TestHelper : TestHelperBase { private readonly ArchiveClient _archiveClient; private readonly DocumentOwner _documentOwner; - private readonly ArchiveDocumentId _documentId; - public TestHelper(ArchiveClient archiveClient, DocumentOwner documentOwner, ArchiveDocumentId documentId) + private readonly ArchiveDocument _document; + public TestHelper(ArchiveClient archiveClient) { _archiveClient = archiveClient; - _documentOwner = documentOwner; - _documentId = documentId; + _documentOwner = new DocumentOwner(_archiveClient.ClientConfiguration.GlobalSender.OrganizationNumber); + _document = new ArchiveDocument("1234"); } public TestHelper Get_PAdES() { - var pades = _archiveClient.GetPades(_documentOwner, _documentId).Result; + var pades = _archiveClient.GetPades(_documentOwner, _document).Result; Assert.True(pades.CanRead); return this; } diff --git a/Digipost.Signature.Api.Client.Archive/ArchiveClient.cs b/Digipost.Signature.Api.Client.Archive/ArchiveClient.cs index aa4d0d6a..be116ee4 100644 --- a/Digipost.Signature.Api.Client.Archive/ArchiveClient.cs +++ b/Digipost.Signature.Api.Client.Archive/ArchiveClient.cs @@ -22,9 +22,9 @@ public ArchiveClient(ClientConfiguration clientConfiguration, ILoggerFactory log _logger = loggerFactory.CreateLogger(); } - public async Task GetPades(DocumentOwner owner, ArchiveDocumentId documentId) + public async Task GetPades(DocumentOwner owner, ArchiveDocument document) { - var uri = new Uri($"{ClientConfiguration.Environment.Url}api/{owner.OrganizationNumber}/archive/documents/{documentId.DocumentId}/pades"); + var uri = new Uri($"{ClientConfiguration.Environment.Url}api/{owner.OrganizationNumber}/archive/documents/{document.Id}/pades"); return await RequestHelper.GetStream(uri).ConfigureAwait(false); } } diff --git a/Digipost.Signature.Api.Client.Archive/ArchiveDocument.cs b/Digipost.Signature.Api.Client.Archive/ArchiveDocument.cs new file mode 100644 index 00000000..4d929ad1 --- /dev/null +++ b/Digipost.Signature.Api.Client.Archive/ArchiveDocument.cs @@ -0,0 +1,11 @@ +namespace Digipost.Signature.Api.Client.Archive +{ + public class ArchiveDocument + { + public ArchiveDocument(string documentId) + { + Id = documentId; + } + public string Id { get; } + } +} diff --git a/Digipost.Signature.Api.Client.Archive/ArchiveDocumentId.cs b/Digipost.Signature.Api.Client.Archive/ArchiveDocumentId.cs deleted file mode 100644 index 10cbec84..00000000 --- a/Digipost.Signature.Api.Client.Archive/ArchiveDocumentId.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace Digipost.Signature.Api.Client.Archive -{ - public class ArchiveDocumentId - { - public ArchiveDocumentId(string archiveDocumentId) - { - DocumentId = archiveDocumentId; - } - public string DocumentId { get; set; } - } -} diff --git a/Digipost.Signature.Api.Client.Archive/ArchiveDocumentOwner.cs b/Digipost.Signature.Api.Client.Archive/ArchiveDocumentOwner.cs index 88430325..185a3d0b 100644 --- a/Digipost.Signature.Api.Client.Archive/ArchiveDocumentOwner.cs +++ b/Digipost.Signature.Api.Client.Archive/ArchiveDocumentOwner.cs @@ -7,6 +7,6 @@ public DocumentOwner(string organizationNumber) OrganizationNumber = organizationNumber; } - public string OrganizationNumber { get; set; } + public string OrganizationNumber { get; } } } From 7ab36081c7e2741266592417e3c9c0814725eb16 Mon Sep 17 00:00:00 2001 From: Rune Flobakk Date: Thu, 17 Oct 2019 13:07:10 +0200 Subject: [PATCH 12/21] Add .vscode folder to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index e0b723cc..8e10d1d8 100644 --- a/.gitignore +++ b/.gitignore @@ -196,6 +196,7 @@ FakesAssemblies/ *.opt .idea +.vscode ####################### # Ignore certificates # From 6dc23bfeb94461c9040809a4f7be49f4b28ec675 Mon Sep 17 00:00:00 2001 From: Rune Flobakk Date: Thu, 17 Oct 2019 13:17:39 +0200 Subject: [PATCH 13/21] Rename ArchiveDocumentOwner.cs to DocumentOwner.cs To align with the actual class name. --- .../{ArchiveDocumentOwner.cs => DocumentOwner.cs} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Digipost.Signature.Api.Client.Archive/{ArchiveDocumentOwner.cs => DocumentOwner.cs} (100%) diff --git a/Digipost.Signature.Api.Client.Archive/ArchiveDocumentOwner.cs b/Digipost.Signature.Api.Client.Archive/DocumentOwner.cs similarity index 100% rename from Digipost.Signature.Api.Client.Archive/ArchiveDocumentOwner.cs rename to Digipost.Signature.Api.Client.Archive/DocumentOwner.cs From c6430569cbdfdbff5a92e9bffc5dd0105eb38398 Mon Sep 17 00:00:00 2001 From: Rune Flobakk Date: Thu, 17 Oct 2019 15:11:46 +0200 Subject: [PATCH 14/21] Rename ArchiveDocument to ArchivedDocumentId This is a "query" object encapsulating an ID, and not representing an actual ArchiveDocument. --- .../Smoke/TestHelper.cs | 4 ++-- .../ArchiveClient.cs | 4 ++-- .../ArchiveDocument.cs | 11 ----------- .../ArchivedDocumentId.cs | 11 +++++++++++ 4 files changed, 15 insertions(+), 15 deletions(-) delete mode 100644 Digipost.Signature.Api.Client.Archive/ArchiveDocument.cs create mode 100644 Digipost.Signature.Api.Client.Archive/ArchivedDocumentId.cs diff --git a/Digipost.Signature.Api.Client.Archive.Tests/Smoke/TestHelper.cs b/Digipost.Signature.Api.Client.Archive.Tests/Smoke/TestHelper.cs index f283b4ff..c2294399 100644 --- a/Digipost.Signature.Api.Client.Archive.Tests/Smoke/TestHelper.cs +++ b/Digipost.Signature.Api.Client.Archive.Tests/Smoke/TestHelper.cs @@ -9,12 +9,12 @@ public class TestHelper : TestHelperBase { private readonly ArchiveClient _archiveClient; private readonly DocumentOwner _documentOwner; - private readonly ArchiveDocument _document; + private readonly ArchivedDocumentId _document; public TestHelper(ArchiveClient archiveClient) { _archiveClient = archiveClient; _documentOwner = new DocumentOwner(_archiveClient.ClientConfiguration.GlobalSender.OrganizationNumber); - _document = new ArchiveDocument("1234"); + _document = new ArchivedDocumentId("1234"); } public TestHelper Get_PAdES() diff --git a/Digipost.Signature.Api.Client.Archive/ArchiveClient.cs b/Digipost.Signature.Api.Client.Archive/ArchiveClient.cs index be116ee4..ff18ae4c 100644 --- a/Digipost.Signature.Api.Client.Archive/ArchiveClient.cs +++ b/Digipost.Signature.Api.Client.Archive/ArchiveClient.cs @@ -22,9 +22,9 @@ public ArchiveClient(ClientConfiguration clientConfiguration, ILoggerFactory log _logger = loggerFactory.CreateLogger(); } - public async Task GetPades(DocumentOwner owner, ArchiveDocument document) + public async Task GetPades(DocumentOwner owner, ArchivedDocumentId id) { - var uri = new Uri($"{ClientConfiguration.Environment.Url}api/{owner.OrganizationNumber}/archive/documents/{document.Id}/pades"); + var uri = new Uri($"{ClientConfiguration.Environment.Url}api/{owner.OrganizationNumber}/archive/documents/{id.Value}/pades"); return await RequestHelper.GetStream(uri).ConfigureAwait(false); } } diff --git a/Digipost.Signature.Api.Client.Archive/ArchiveDocument.cs b/Digipost.Signature.Api.Client.Archive/ArchiveDocument.cs deleted file mode 100644 index 4d929ad1..00000000 --- a/Digipost.Signature.Api.Client.Archive/ArchiveDocument.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace Digipost.Signature.Api.Client.Archive -{ - public class ArchiveDocument - { - public ArchiveDocument(string documentId) - { - Id = documentId; - } - public string Id { get; } - } -} diff --git a/Digipost.Signature.Api.Client.Archive/ArchivedDocumentId.cs b/Digipost.Signature.Api.Client.Archive/ArchivedDocumentId.cs new file mode 100644 index 00000000..d61cc07c --- /dev/null +++ b/Digipost.Signature.Api.Client.Archive/ArchivedDocumentId.cs @@ -0,0 +1,11 @@ +namespace Digipost.Signature.Api.Client.Archive +{ + public class ArchivedDocumentId + { + public ArchivedDocumentId(string documentId) + { + Value = documentId; + } + public string Value { get; } + } +} From 999f15b85db72dfb4c6a95cbe09830d6bdca37df Mon Sep 17 00:00:00 2001 From: Rune Flobakk Date: Thu, 17 Oct 2019 15:18:09 +0200 Subject: [PATCH 15/21] Change scope of method to private As requested in PR comment: https://github.com/digipost/signature-api-client-dotnet/pull/230/files#r333831445 --- Digipost.Signature.Api.Client.Core/BaseClient.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Digipost.Signature.Api.Client.Core/BaseClient.cs b/Digipost.Signature.Api.Client.Core/BaseClient.cs index d3e964be..256d4070 100644 --- a/Digipost.Signature.Api.Client.Core/BaseClient.cs +++ b/Digipost.Signature.Api.Client.Core/BaseClient.cs @@ -65,7 +65,7 @@ protected Sender CurrentSender(Sender jobSender) return sender; } - internal void ValidateSenderCertificateThrowIfInvalid() + private void ValidateSenderCertificateThrowIfInvalid() { var validationResult = CertificateValidator.ValidateCertificateAndChain(ClientConfiguration.Certificate, ClientConfiguration.Environment.AllowedChainCertificates); From bb61f9adc5af8ba357eb54b3e90aed1f10d592e0 Mon Sep 17 00:00:00 2001 From: Rune Flobakk Date: Thu, 17 Oct 2019 15:22:52 +0200 Subject: [PATCH 16/21] Add whitespace --- .../Smoke/ArchiveSmokeTests.cs | 2 ++ Digipost.Signature.Api.Client.Archive.Tests/Smoke/TestHelper.cs | 1 + 2 files changed, 3 insertions(+) diff --git a/Digipost.Signature.Api.Client.Archive.Tests/Smoke/ArchiveSmokeTests.cs b/Digipost.Signature.Api.Client.Archive.Tests/Smoke/ArchiveSmokeTests.cs index 239e4ab7..e77aa576 100644 --- a/Digipost.Signature.Api.Client.Archive.Tests/Smoke/ArchiveSmokeTests.cs +++ b/Digipost.Signature.Api.Client.Archive.Tests/Smoke/ArchiveSmokeTests.cs @@ -15,7 +15,9 @@ public ArchiveSmokeTestsFixture() { TestHelper = new TestHelper(ArchiveClient(Endpoint)); } + public TestHelper TestHelper { get; } + private static ArchiveClient ArchiveClient(Environment environment) { var serviceProvider = LoggingUtility.CreateServiceProviderAndSetUpLogging(); diff --git a/Digipost.Signature.Api.Client.Archive.Tests/Smoke/TestHelper.cs b/Digipost.Signature.Api.Client.Archive.Tests/Smoke/TestHelper.cs index c2294399..ba2e32f4 100644 --- a/Digipost.Signature.Api.Client.Archive.Tests/Smoke/TestHelper.cs +++ b/Digipost.Signature.Api.Client.Archive.Tests/Smoke/TestHelper.cs @@ -10,6 +10,7 @@ public class TestHelper : TestHelperBase private readonly ArchiveClient _archiveClient; private readonly DocumentOwner _documentOwner; private readonly ArchivedDocumentId _document; + public TestHelper(ArchiveClient archiveClient) { _archiveClient = archiveClient; From 9c62ec126a2528f722e7c2e2643243f393d1405e Mon Sep 17 00:00:00 2001 From: Rune Flobakk Date: Thu, 17 Oct 2019 15:32:02 +0200 Subject: [PATCH 17/21] Remove Console.WriteLine --- Digipost.Signature.Api.Client.Direct.Tests/Smoke/TestHelper.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Digipost.Signature.Api.Client.Direct.Tests/Smoke/TestHelper.cs b/Digipost.Signature.Api.Client.Direct.Tests/Smoke/TestHelper.cs index 2e4bcc64..14071e63 100644 --- a/Digipost.Signature.Api.Client.Direct.Tests/Smoke/TestHelper.cs +++ b/Digipost.Signature.Api.Client.Direct.Tests/Smoke/TestHelper.cs @@ -155,7 +155,6 @@ public TestHelper Get_PAdES() { Assert_state(_status); - Console.WriteLine(_status.References.Pades); var pades = _directClient.GetPades(_status.References.Pades).Result; Assert.True(pades.CanRead); return this; From 5d6f29afbfafb03402cafdc491304724ee2346bf Mon Sep 17 00:00:00 2001 From: Rune Flobakk Date: Mon, 21 Oct 2019 09:55:42 +0200 Subject: [PATCH 18/21] Fail test if it does not throw when expected to --- .../Smoke/TestHelper.cs | 23 ++++--------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/Digipost.Signature.Api.Client.Archive.Tests/Smoke/TestHelper.cs b/Digipost.Signature.Api.Client.Archive.Tests/Smoke/TestHelper.cs index ba2e32f4..c6c8387f 100644 --- a/Digipost.Signature.Api.Client.Archive.Tests/Smoke/TestHelper.cs +++ b/Digipost.Signature.Api.Client.Archive.Tests/Smoke/TestHelper.cs @@ -17,7 +17,7 @@ public TestHelper(ArchiveClient archiveClient) _documentOwner = new DocumentOwner(_archiveClient.ClientConfiguration.GlobalSender.OrganizationNumber); _document = new ArchivedDocumentId("1234"); } - + public TestHelper Get_PAdES() { var pades = _archiveClient.GetPades(_documentOwner, _document).Result; @@ -27,24 +27,9 @@ public TestHelper Get_PAdES() public void Download_pades_and_expect_client_error() { - try - { - Get_PAdES(); - } - catch (AggregateException ex) - { - if(ex.InnerException is UnexpectedResponseException) - { - UnexpectedResponseException exception = (UnexpectedResponseException) ex.InnerException; - Assert.Equal("ARCHIVED_DOCUMENT_NOT_FOUND", exception.Error.Code); - } - else - { - Assert.True(false, $"Expected UnexpectedResponseException, but found {ex.InnerException.GetType().Name}."); - } - } - - + var thrown = Assert.Throws(() => Get_PAdES()); + var actualError = Assert.IsType(thrown.InnerException); + Assert.Equal("ARCHIVED_DOCUMENT_NOT_FOUND", actualError.Error.Code); } } From 385548bdb3baf51c27a0e20e11dfb5b7ee9bcc04 Mon Sep 17 00:00:00 2001 From: Rune Flobakk Date: Mon, 21 Oct 2019 10:11:40 +0200 Subject: [PATCH 19/21] Upgrade some test dependencies --- .../Digipost.Signature.Api.Client.Core.Tests.csproj | 4 ++-- .../Digipost.Signature.Api.Client.Direct.Tests.csproj | 2 +- .../Digipost.Signature.Api.Client.Portal.Tests.csproj | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Digipost.Signature.Api.Client.Core.Tests/Digipost.Signature.Api.Client.Core.Tests.csproj b/Digipost.Signature.Api.Client.Core.Tests/Digipost.Signature.Api.Client.Core.Tests.csproj index 4d4fb08e..3d3461f0 100644 --- a/Digipost.Signature.Api.Client.Core.Tests/Digipost.Signature.Api.Client.Core.Tests.csproj +++ b/Digipost.Signature.Api.Client.Core.Tests/Digipost.Signature.Api.Client.Core.Tests.csproj @@ -2,13 +2,13 @@ - + - + diff --git a/Digipost.Signature.Api.Client.Direct.Tests/Digipost.Signature.Api.Client.Direct.Tests.csproj b/Digipost.Signature.Api.Client.Direct.Tests/Digipost.Signature.Api.Client.Direct.Tests.csproj index 2760131c..f7d540f3 100644 --- a/Digipost.Signature.Api.Client.Direct.Tests/Digipost.Signature.Api.Client.Direct.Tests.csproj +++ b/Digipost.Signature.Api.Client.Direct.Tests/Digipost.Signature.Api.Client.Direct.Tests.csproj @@ -1,7 +1,7 @@  - + diff --git a/Digipost.Signature.Api.Client.Portal.Tests/Digipost.Signature.Api.Client.Portal.Tests.csproj b/Digipost.Signature.Api.Client.Portal.Tests/Digipost.Signature.Api.Client.Portal.Tests.csproj index 7bf3aef4..e8165122 100644 --- a/Digipost.Signature.Api.Client.Portal.Tests/Digipost.Signature.Api.Client.Portal.Tests.csproj +++ b/Digipost.Signature.Api.Client.Portal.Tests/Digipost.Signature.Api.Client.Portal.Tests.csproj @@ -1,7 +1,7 @@  - + From 544e12b0fd8e44f741690906a8a2b5412646d48b Mon Sep 17 00:00:00 2001 From: Rune Flobakk Date: Mon, 21 Oct 2019 10:41:24 +0200 Subject: [PATCH 20/21] Upgrade Logging, DependencyInjection 2.x to 3.0.x --- .../Digipost.Signature.Api.Client.Archive.Tests.csproj | 2 +- .../Digipost.Signature.Api.Client.Archive.csproj | 2 +- .../Digipost.Signature.Api.Client.Core.Tests.csproj | 8 ++++---- .../Digipost.Signature.Api.Client.Core.csproj | 10 +++++----- .../Digipost.Signature.Api.Client.Direct.Tests.csproj | 6 +++--- .../Digipost.Signature.Api.Client.Direct.csproj | 4 ++-- .../Digipost.Signature.Api.Client.Docs.csproj | 2 +- .../Digipost.Signature.Api.Client.Portal.Tests.csproj | 8 ++++---- .../Digipost.Signature.Api.Client.Portal.csproj | 6 +++--- 9 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Digipost.Signature.Api.Client.Archive.Tests/Digipost.Signature.Api.Client.Archive.Tests.csproj b/Digipost.Signature.Api.Client.Archive.Tests/Digipost.Signature.Api.Client.Archive.Tests.csproj index c848ede6..960da4e5 100644 --- a/Digipost.Signature.Api.Client.Archive.Tests/Digipost.Signature.Api.Client.Archive.Tests.csproj +++ b/Digipost.Signature.Api.Client.Archive.Tests/Digipost.Signature.Api.Client.Archive.Tests.csproj @@ -5,7 +5,7 @@ - + diff --git a/Digipost.Signature.Api.Client.Archive/Digipost.Signature.Api.Client.Archive.csproj b/Digipost.Signature.Api.Client.Archive/Digipost.Signature.Api.Client.Archive.csproj index 303c48df..f9f73074 100644 --- a/Digipost.Signature.Api.Client.Archive/Digipost.Signature.Api.Client.Archive.csproj +++ b/Digipost.Signature.Api.Client.Archive/Digipost.Signature.Api.Client.Archive.csproj @@ -8,7 +8,7 @@ - + diff --git a/Digipost.Signature.Api.Client.Core.Tests/Digipost.Signature.Api.Client.Core.Tests.csproj b/Digipost.Signature.Api.Client.Core.Tests/Digipost.Signature.Api.Client.Core.Tests.csproj index 3d3461f0..3361a0f9 100644 --- a/Digipost.Signature.Api.Client.Core.Tests/Digipost.Signature.Api.Client.Core.Tests.csproj +++ b/Digipost.Signature.Api.Client.Core.Tests/Digipost.Signature.Api.Client.Core.Tests.csproj @@ -9,10 +9,10 @@ - - - - + + + + diff --git a/Digipost.Signature.Api.Client.Core/Digipost.Signature.Api.Client.Core.csproj b/Digipost.Signature.Api.Client.Core/Digipost.Signature.Api.Client.Core.csproj index b5b646cb..31257256 100644 --- a/Digipost.Signature.Api.Client.Core/Digipost.Signature.Api.Client.Core.csproj +++ b/Digipost.Signature.Api.Client.Core/Digipost.Signature.Api.Client.Core.csproj @@ -4,7 +4,7 @@ Digipost Signature Api Client Core Digipost.Signature.Api.Client.Core - + @@ -13,10 +13,10 @@ - - - - + + + + diff --git a/Digipost.Signature.Api.Client.Direct.Tests/Digipost.Signature.Api.Client.Direct.Tests.csproj b/Digipost.Signature.Api.Client.Direct.Tests/Digipost.Signature.Api.Client.Direct.Tests.csproj index f7d540f3..b249db7d 100644 --- a/Digipost.Signature.Api.Client.Direct.Tests/Digipost.Signature.Api.Client.Direct.Tests.csproj +++ b/Digipost.Signature.Api.Client.Direct.Tests/Digipost.Signature.Api.Client.Direct.Tests.csproj @@ -4,9 +4,9 @@ - - - + + + diff --git a/Digipost.Signature.Api.Client.Direct/Digipost.Signature.Api.Client.Direct.csproj b/Digipost.Signature.Api.Client.Direct/Digipost.Signature.Api.Client.Direct.csproj index b36618e2..9679ca55 100644 --- a/Digipost.Signature.Api.Client.Direct/Digipost.Signature.Api.Client.Direct.csproj +++ b/Digipost.Signature.Api.Client.Direct/Digipost.Signature.Api.Client.Direct.csproj @@ -6,9 +6,9 @@ - + - + diff --git a/Digipost.Signature.Api.Client.Docs/Digipost.Signature.Api.Client.Docs.csproj b/Digipost.Signature.Api.Client.Docs/Digipost.Signature.Api.Client.Docs.csproj index 2361d552..b8388c58 100644 --- a/Digipost.Signature.Api.Client.Docs/Digipost.Signature.Api.Client.Docs.csproj +++ b/Digipost.Signature.Api.Client.Docs/Digipost.Signature.Api.Client.Docs.csproj @@ -1,7 +1,7 @@  - + diff --git a/Digipost.Signature.Api.Client.Portal.Tests/Digipost.Signature.Api.Client.Portal.Tests.csproj b/Digipost.Signature.Api.Client.Portal.Tests/Digipost.Signature.Api.Client.Portal.Tests.csproj index e8165122..d268555e 100644 --- a/Digipost.Signature.Api.Client.Portal.Tests/Digipost.Signature.Api.Client.Portal.Tests.csproj +++ b/Digipost.Signature.Api.Client.Portal.Tests/Digipost.Signature.Api.Client.Portal.Tests.csproj @@ -6,10 +6,10 @@ - - - - + + + + diff --git a/Digipost.Signature.Api.Client.Portal/Digipost.Signature.Api.Client.Portal.csproj b/Digipost.Signature.Api.Client.Portal/Digipost.Signature.Api.Client.Portal.csproj index 7e534972..0ac2d781 100644 --- a/Digipost.Signature.Api.Client.Portal/Digipost.Signature.Api.Client.Portal.csproj +++ b/Digipost.Signature.Api.Client.Portal/Digipost.Signature.Api.Client.Portal.csproj @@ -7,9 +7,9 @@ - - - + + + From 9a36aa021992d55b85f9c6af4aa5dfa97c7dec17 Mon Sep 17 00:00:00 2001 From: Rune Flobakk Date: Mon, 21 Oct 2019 13:19:03 +0200 Subject: [PATCH 21/21] Change interdependencies version to 6.* --- .../Digipost.Signature.Api.Client.Archive.csproj | 2 +- .../Digipost.Signature.Api.Client.Core.csproj | 4 ++-- .../Digipost.Signature.Api.Client.Direct.csproj | 2 +- .../Digipost.Signature.Api.Client.Portal.csproj | 2 +- .../Digipost.Signature.Api.Client.Program.csproj | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Digipost.Signature.Api.Client.Archive/Digipost.Signature.Api.Client.Archive.csproj b/Digipost.Signature.Api.Client.Archive/Digipost.Signature.Api.Client.Archive.csproj index f9f73074..f59032e1 100644 --- a/Digipost.Signature.Api.Client.Archive/Digipost.Signature.Api.Client.Archive.csproj +++ b/Digipost.Signature.Api.Client.Archive/Digipost.Signature.Api.Client.Archive.csproj @@ -11,7 +11,7 @@ - + diff --git a/Digipost.Signature.Api.Client.Core/Digipost.Signature.Api.Client.Core.csproj b/Digipost.Signature.Api.Client.Core/Digipost.Signature.Api.Client.Core.csproj index 31257256..06b27171 100644 --- a/Digipost.Signature.Api.Client.Core/Digipost.Signature.Api.Client.Core.csproj +++ b/Digipost.Signature.Api.Client.Core/Digipost.Signature.Api.Client.Core.csproj @@ -18,8 +18,8 @@ - - + + diff --git a/Digipost.Signature.Api.Client.Direct/Digipost.Signature.Api.Client.Direct.csproj b/Digipost.Signature.Api.Client.Direct/Digipost.Signature.Api.Client.Direct.csproj index 9679ca55..6c91de3c 100644 --- a/Digipost.Signature.Api.Client.Direct/Digipost.Signature.Api.Client.Direct.csproj +++ b/Digipost.Signature.Api.Client.Direct/Digipost.Signature.Api.Client.Direct.csproj @@ -13,7 +13,7 @@ - + diff --git a/Digipost.Signature.Api.Client.Portal/Digipost.Signature.Api.Client.Portal.csproj b/Digipost.Signature.Api.Client.Portal/Digipost.Signature.Api.Client.Portal.csproj index 0ac2d781..ae3d0f36 100644 --- a/Digipost.Signature.Api.Client.Portal/Digipost.Signature.Api.Client.Portal.csproj +++ b/Digipost.Signature.Api.Client.Portal/Digipost.Signature.Api.Client.Portal.csproj @@ -11,7 +11,7 @@ - + diff --git a/Digipost.Signature.Api.Client.Program/Digipost.Signature.Api.Client.Program.csproj b/Digipost.Signature.Api.Client.Program/Digipost.Signature.Api.Client.Program.csproj index a1c93907..336476e9 100644 --- a/Digipost.Signature.Api.Client.Program/Digipost.Signature.Api.Client.Program.csproj +++ b/Digipost.Signature.Api.Client.Program/Digipost.Signature.Api.Client.Program.csproj @@ -1,8 +1,8 @@ - - + +