Skip to content
This repository was archived by the owner on Feb 11, 2025. It is now read-only.

Perform maintenance on the unit tests project #576

Merged
merged 5 commits into from
Oct 4, 2024

Conversation

0xced
Copy link
Contributor

@0xced 0xced commented May 29, 2024

  • Remove the dependency on Microsoft.Extensions.PlatformAbstraction and use [CallerFilePath] in order to get the path to the test documents, making it unnecessary to copy the files from the documents directory to the output directory.
  • Remove conditions around Microsoft.AspNetCore.WebUtilities (it was unnecessary)
  • Update all test dependencies and adapt the tests for FluentAssertions 6 breaking changes.
  • Simplify the definition of the target frameworks by removing conditional compilation around osx-arm64

Also avoid duplicating the .NET target framework but add net462 and net472 when running on Windows (on both the main and unit tests projects).

0xced added 5 commits October 2, 2024 20:56
Use [CallerFilePath] in order to get the path to the test documents, making it unnecessary to copy the files from the `documents` directory to the output directory.

Also disable deterministic source paths so that the caller file path is never substituted with /_/ in case `ContinuousIntegrationBuild` is enabled.
Microsoft.AspNetCore.WebUtilities 2.2.0 is used on all target frameworks so the conditions were unnecessary.
Adapt the tests for FluentAssertions 6 breaking changes.
Remove conditional compilation around osx-arm64 which was introduced in DuendeArchive#428 but is not necessary anymore now that the library is targeting .NET 6 onwards.

Also avoid duplicating the .NET target framework but add net462 and net472 when running on Windows (on both the main and unit tests projects).
The `Should().BeEquivalentTo()` versions are much easier to read, actually test all the properties and in case of failure the error messages are excellent.
@damianh
Copy link
Contributor

damianh commented Oct 4, 2024

Looks good to me. Thanks for the contribution @0xced!

@damianh damianh merged commit bfeab0b into DuendeArchive:main Oct 4, 2024
5 checks passed
@0xced 0xced deleted the UpdateUnitTests branch October 27, 2024 10:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants