Skip to content
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

Develop2master #17

Closed
wants to merge 51 commits into from
Closed

Develop2master #17

wants to merge 51 commits into from

Conversation

jnyrup
Copy link
Owner

@jnyrup jnyrup commented Jul 14, 2024

Cherry-pick fixes from develop to master

Currently excluding fluentassertions#2569

I added these four commits to make it compilable.

IMPORTANT

  • If the PR touches the public API, the changes have been approved in a separate issue with the "api-approved" label.
  • The code complies with the Coding Guidelines for C#.
  • The changes are covered by unit tests which follow the Arrange-Act-Assert syntax and the naming conventions such as is used in these tests.
  • If the PR adds a feature or fixes a bug, please update the release notes with a functional description that explains what the change means to consumers of this library, which are published on the website.
  • If the PR changes the public API the changes needs to be included by running AcceptApiChanges.ps1 or AcceptApiChanges.sh.
  • If the PR affects the documentation, please include your changes in this pull request so the documentation will appear on the website.
    • Please also run ./build.sh --target spellcheck or .\build.ps1 --target spellcheck before pushing and check the good outcome

jnyrup and others added 27 commits August 18, 2024 14:47
…implemented through an explicitly-implemented interface

fixup! BeEquivalentTo will now find and can map subject properties that are implemented through an explicitly-implemented interface
To make it more visible that `GetMethod` is non-null inside `IsExplicitImplementation`
…pectation (fluentassertions#2358)

* Handle non-generic `dictionary` subject when compared with a generic `dictionary` expectation

* Add release notes

Co-authored-by: Jonas Nyrup <[email protected]>

---------

Co-authored-by: Jonas Nyrup <[email protected]>
…2329)

* Pass `FormattingOptions` to inner `AssertionScope`

* Add release notes

* Simplify the `AssertionOptions.Formatting` test
* chore: capitalize true and false

Display 'true' and 'false' as capitalized rathen than in lowercase so that both expected value and actual value uses the same casing.
---Before---
"Expected boolean to be false, but found True."
---After---
"Expected boolean to be False, but found True."

* docs: update releases.md
This allows any potential BooleanFormatter to format them
* Add release notes for fluentassertions#2393

* Update releases.md

Co-authored-by: Jonas Nyrup <[email protected]>

---------

Co-authored-by: Jonas Nyrup <[email protected]>
…eption is `null` (fluentassertions#2398)

* Improved the failure message for `ThrowExactly[Async]`

* Add release notes

Co-authored-by: Jonas Nyrup <[email protected]>

---------

Co-authored-by: IT-VBFK <[email protected]>
Co-authored-by: Jonas Nyrup <[email protected]>
…hod)` (fluentassertions#2403)

* Guard against assertion scope: `[Not]HaveExplicitProperty`

* Guard against assertion scope: `[Not]HaveExplicitMethod`

* Add release notes
ITaluone and others added 7 commits August 18, 2024 14:47
For properties and methods `PropertyInfoAssertions` and `MethodBaseAssertions` have assertions to exercise the `private`, `protected` and `private protected` cases in `GetCSharpAccessModifier(MethodBase)`.
We don't have `FieldInfoAssertions` so we only exercise the access modifiers on fields through `WhichGetterHas`/`WhichSetterHas`.
Since `GetFieldsFromHierarchy` excludes `private`, `protected` and `private protected` fields those three cases cannot currently be hit through the public API.
vbreuss and others added 16 commits August 24, 2024 19:35
…ons#2448)

* Fix "Possible 'null' assignment to non-nullable entity"

* Add null check only when not NET6 or greater
…sertions#2511)

* Fix issue when an empty ArraySegmnet is a member of a class.

With latest, it crashes when trying to access the array members.

* Fix PR comments.

* Fix Qodana complaints

* Update releases.md

* Address review comments

---------

Co-authored-by: Shahar Prish <[email protected]>
…2489)

* Correct null handling when having a nullable struct propertywith a custom comparer.

fluentassertions#2480

* Release notes added

* typo corrected

* Removed the check for only value types and added the null check for the expectation. Also added more tests for all cases.

* typo corrected

* Warnings solved

* Added a comment for the changed code

* Comment cleaned

* Update docs/_pages/releases.md

Co-authored-by: Jonas Nyrup <[email protected]>

* Typo corrected

Co-authored-by: ITaluone <[email protected]>

* Corrected Qodana issues

* cleanups

---------

Co-authored-by: Martin Demberger <[email protected]>
Co-authored-by: Jonas Nyrup <[email protected]>
Co-authored-by: ITaluone <[email protected]>
Co-authored-by: Jonas Nyrup <[email protected]>
…entassertions#2530)

* BeEmpty() materializes IEnumerable<T> only once, even on failure

- Make BeEmpty() materialize only the first item, as no further processing is needed for validation
- The error message now mentions "but found at least 1 item" and outputs the said item

* Tweak error message & fix tests

* Make similar changes for BeNullOrEmpty

* Add test, as per request
…assertions#2607)

Also fixed an inconsistency in which one overload of the assertion scope constructor would not actually affect AssertionScope.Current.
The local function avoid allocating a lambda when not used.
For more details, see: dotnet/roslyn#20777
* Create profile.yaml

* Update qodana.yaml

* Update profile.yaml

* Update code_quality.yml

* Update code_quality.yml
@jnyrup jnyrup closed this Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.