diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index c1463d66..7d21759b 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -36,7 +36,7 @@ jobs: with: dotnet-version: "8.0.x" - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ~/.nuget/packages key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} @@ -83,7 +83,7 @@ jobs: 6.0.x 8.0.x - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ~/.nuget/packages key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 30f5dbb1..25f14e26 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -27,7 +27,7 @@ jobs: with: dotnet-version: "8.0.x" - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ~/.nuget/packages key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} @@ -68,7 +68,7 @@ jobs: with: dotnet-version: "8.0.x" - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ~/.nuget/packages key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 04e43a6a..a0f5f04e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # CHANGELOG +## v3.11.0 - 2024-03-26 +### Changes +* :white_check_mark: compatibility with .NET 8.0 +* :sparkles: update Invoice to v4.5 +* :sparkles: add support for generated documents + + ## v3.10.0 - 2024-03-06 ### Changes * :sparkles: add support for error in job processing diff --git a/Directory.Build.props b/Directory.Build.props index d8d81bbb..e87bf3d9 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,6 +1,6 @@ - 3.10.0 + 3.11.0 Mindee https://github.com/mindee/mindee-api-dotnet https://github.com/mindee/mindee-api-dotnet diff --git a/tests/Mindee.IntegrationTests/MindeeClientTest.cs b/tests/Mindee.IntegrationTests/MindeeClientTest.cs index 9e1e33b5..469ee40c 100644 --- a/tests/Mindee.IntegrationTests/MindeeClientTest.cs +++ b/tests/Mindee.IntegrationTests/MindeeClientTest.cs @@ -185,8 +185,9 @@ public async Task EnqueueAndParse_File_Standard_AsyncOnly_Async_MustSucceed() [Fact] public async Task ParseQueued_Standard_InvalidJob_MustFail() { + var jobId = RandomString(15); await Assert.ThrowsAsync( - () => _mindeeClient.ParseQueuedAsync("bad-job-id")); + () => _mindeeClient.ParseQueuedAsync(jobId)); } [Fact] @@ -223,9 +224,18 @@ public async Task EnqueueAndParse_File_Generated_AsyncOnly_Async_MustSucceed() [Fact] public async Task ParseQueued_Generated_InvalidJob_MustFail() { + var jobId = RandomString(15); var endpoint = new CustomEndpoint("international_id", "mindee", "2"); await Assert.ThrowsAsync( - () => _mindeeClient.ParseQueuedAsync(endpoint, "bad-job-id")); + () => _mindeeClient.ParseQueuedAsync(endpoint, jobId)); + } + + private static string RandomString(int length) + { + Random random = new Random(); + const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; + return new string(Enumerable.Repeat(chars, length) + .Select(s => s[random.Next(s.Length)]).ToArray()); } } }