diff --git a/PdfAValidator/PdfAValidator.csproj b/PdfAValidator/PdfAValidator.csproj
index 3200ed5..d56be47 100644
--- a/PdfAValidator/PdfAValidator.csproj
+++ b/PdfAValidator/PdfAValidator.csproj
@@ -27,6 +27,7 @@
8.0
Codeuctivity
en
+ true
@@ -46,11 +47,7 @@
-
- runtime; build; native; contentfiles; analyzers; buildtransitive
- all
-
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/PdfAValidatorTest/PdfAValidatorTest.csproj b/PdfAValidatorTest/PdfAValidatorTest.csproj
index ab0446c..7677f4e 100644
--- a/PdfAValidatorTest/PdfAValidatorTest.csproj
+++ b/PdfAValidatorTest/PdfAValidatorTest.csproj
@@ -1,7 +1,7 @@
- netcoreapp3.1
+ net5
false
enable
8.0
@@ -43,17 +43,13 @@
-
- runtime; build; native; contentfiles; analyzers; buildtransitive
- all
-
-
-
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/PdfAValidatorWebApi/PdfAValidatorWebApi.csproj b/PdfAValidatorWebApi/PdfAValidatorWebApi.csproj
index 93894ea..8c0809d 100644
--- a/PdfAValidatorWebApi/PdfAValidatorWebApi.csproj
+++ b/PdfAValidatorWebApi/PdfAValidatorWebApi.csproj
@@ -1,7 +1,7 @@
- netcoreapp3.1
+ net5
true
enable
8.0
@@ -12,17 +12,13 @@
-
- runtime; build; native; contentfiles; analyzers; buildtransitive
- all
-
-
-
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
+
+
diff --git a/PdfAValidatorWebApiTest/IntegrativeTests.cs b/PdfAValidatorWebApiTest/IntegrativeTests.cs
index 92ed2b0..d278c68 100644
--- a/PdfAValidatorWebApiTest/IntegrativeTests.cs
+++ b/PdfAValidatorWebApiTest/IntegrativeTests.cs
@@ -30,7 +30,7 @@ public async Task ShouldAccessEndpointSuccessfull(string route, string contentTy
// Assert
response.EnsureSuccessStatusCode();
- Assert.Equal(contentType, response.Content.Headers.ContentType.ToString());
+ Assert.Equal(contentType, response.Content.Headers.ContentType?.ToString());
}
[Fact]
@@ -41,8 +41,10 @@ public async Task ShouldValidatePdf()
using var request = new HttpRequestMessage(new HttpMethod("POST"), "http://localhost/api/PdfAValidator");
using var file = new ByteArrayContent(File.ReadAllBytes("../../../FromLibreOffice.pdf"));
file.Headers.Add("Content-Type", "application/pdf");
- var multipartContent = new MultipartFormDataContent();
- multipartContent.Add(file, "pdfFile", Path.GetFileName("FromLibreOffice.pdf"));
+ var multipartContent = new MultipartFormDataContent
+ {
+ { file, "pdfFile", Path.GetFileName("FromLibreOffice.pdf") }
+ };
request.Content = multipartContent;
// Act
@@ -61,8 +63,10 @@ public async Task ShouldValidatePdfDetailedReport()
using var request = new HttpRequestMessage(new HttpMethod("POST"), "http://localhost/api/PdfAValidator/DetailedReport");
using var file = new ByteArrayContent(File.ReadAllBytes("../../../FromLibreOffice.pdf"));
file.Headers.Add("Content-Type", "application/pdf");
- var multipartContent = new MultipartFormDataContent();
- multipartContent.Add(file, "pdfFile", Path.GetFileName("FromLibreOffice.pdf"));
+ var multipartContent = new MultipartFormDataContent
+ {
+ { file, "pdfFile", Path.GetFileName("FromLibreOffice.pdf") }
+ };
request.Content = multipartContent;
// Act
@@ -70,8 +74,8 @@ public async Task ShouldValidatePdfDetailedReport()
// Assert
response.EnsureSuccessStatusCode();
- string actual = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
+ var actual = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
Assert.Contains("isCompliant\":true", actual);
}
}
-}
+}
\ No newline at end of file
diff --git a/PdfAValidatorWebApiTest/PdfAValidatorWebApiTest.csproj b/PdfAValidatorWebApiTest/PdfAValidatorWebApiTest.csproj
index b08f32f..3d2bf8b 100644
--- a/PdfAValidatorWebApiTest/PdfAValidatorWebApiTest.csproj
+++ b/PdfAValidatorWebApiTest/PdfAValidatorWebApiTest.csproj
@@ -1,31 +1,23 @@
- netcoreapp3.1
+ net5
false
enable
8.0
-
- runtime; build; native; contentfiles; analyzers; buildtransitive
- all
-
-
+
-
-
-
+
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
- runtime; build; native; contentfiles; analyzers; buildtransitive
- all
-
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all