-
Notifications
You must be signed in to change notification settings - Fork 731
Extend AssemblyAssertions with HavePublicKey and BeUnsigned
#2207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extend AssemblyAssertions with HavePublicKey and BeUnsigned
#2207
Conversation
Tests/FluentAssertions.Specs/Specialized/AssemblyAssertionSpecs.cs
Outdated
Show resolved
Hide resolved
Tests/FluentAssertions.Specs/Specialized/AssemblyAssertionSpecs.cs
Outdated
Show resolved
Hide resolved
|
Thank you for this proposal. As you can see from the checklist, the idea is that you first create an issue with an API proposal so we can discuss the consequences. But since we know each other let's see if we can take this PR further 🫢 |
|
When writing the API proposal, please check whether asserting signature fingerprint only is possible and - maybe - easier to use. |
I know. I had the code already, and I was not sure my self yet which API to propose. That's the reason I already started this PR. But if this a desired extension to the API, and if not, what to add (or to add this at all) definitionally should be discussed too. |
|
It looks promising, but let's discuss the API in a GH issue first. That people already started commenting on the implementation before the shape was agreed upon proves the need to keep these thing separate. |
|
@dennisdoomen :Note that locally my build fails, as it claims that C#11 features are not available, and all warnings are handled as errors. Can someone enlighten me on why that could happen? |
|
Do you have the .NET 7 SDK installed? Our global.json file should specify the minimum required version. |
Yes I have. Both for my company and multiple open source projects I work on require that. As mentioned, also the thing that (and that only happens for this solution) all warnings are handled as errors is strange. |
I recommend joining our Slack to have a more efficient discussion. You can use this invite. |
Tests/FluentAssertions.Specs/Specialized/AssemblyAssertionSpecs.cs
Outdated
Show resolved
Hide resolved
Tests/FluentAssertions.Specs/Specialized/AssemblyAssertionSpecs.cs
Outdated
Show resolved
Hide resolved
Tests/FluentAssertions.Specs/Specialized/AssemblyAssertionSpecs.cs
Outdated
Show resolved
Hide resolved
HavePublicKey and NotHavePublicKey
f4e80fc to
0ffd9bd
Compare
dennisdoomen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Please assume comments also apply to other places in the PR.
- Also update the
releases.mdand theassemblies.md
b62d741 to
a1b928a
Compare
Pull Request Test Coverage Report for Build 5705024583Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
jnyrup
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍
Please also add an example to the docs
and update the release notes
Tests/FluentAssertions.Specs/Specialized/AssemblyAssertionSpecs.cs
Outdated
Show resolved
Hide resolved
Tests/FluentAssertions.Specs/Specialized/AssemblyAssertionSpecs.cs
Outdated
Show resolved
Hide resolved
HavePublicKey and NotHavePublicKeyAssemblyAssertions with BeSignedWithPublicKey and BeUnsigned
To ensures that the public key of an signed assembly does not accidentally changes, having an assertion
.HasPublicKey(string)can help. Hence this PR. For completeness/symmetry reasons I also added.BeUnsigned().IMPORTANT
./build.sh --target spellcheckor.\build.ps1 --target spellcheckbefore pushing and check the good outcomeRelevant issue: #2209