-
Notifications
You must be signed in to change notification settings - Fork 663
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
Handle comparing an IDictionary
subject with an IDictionary<,>
expectation
#2358
Handle comparing an IDictionary
subject with an IDictionary<,>
expectation
#2358
Conversation
Qodana for .NETIt seems all right 👌 No new problems were found according to the checks applied 💡 Qodana analysis was run in the pull request mode: only the changed files were checked View the detailed Qodana reportTo be able to view the detailed Qodana report, you can either:
To get - name: 'Qodana Scan'
uses: JetBrains/qodana-action@v2023.2.6
with:
upload-result: true Contact Qodana teamContact us at qodana-support@jetbrains.com
|
Out of curiosity: Should this test fail or pass? [Fact]
public void A_enumerable_of_key_value_pairs_and_generic_dict()
{
var subject = new List<KeyValuePair<string, object>>
{
new("id", 22),
new("CustomerId", 33)
};
var expected = new Dictionary<object, object>
{
["id"] = 22,
["CustomerId"] = 33
};
subject.Should().BeEquivalentTo(expected);
} Edit: Oh.. it does 🙈 (with |
5dbdcf0
to
03a21cf
Compare
Pull Request Test Coverage Report for Build 6472389490
💛 - Coveralls |
Src/FluentAssertions/Equivalency/Steps/GenericDictionaryEquivalencyStep.cs
Outdated
Show resolved
Hide resolved
dictionary
subject when compared with a generic dictionary
expectationIDictionary
subject with an IDictionary<,>
expectation
ccef602
to
685f631
Compare
It's totally fine to combine the fix and the refactorings in a single PR. But that requires you to ensure that every commit has a clear purpose so that we can review them one by one and we can rebase-merge them. But in your case, it looks like some commits are rework on earlier commits. Same for the "release notes" commit. |
Src/FluentAssertions/Equivalency/Steps/GenericDictionaryEquivalencyStep.cs
Outdated
Show resolved
Hide resolved
Src/FluentAssertions/Equivalency/Steps/GenericDictionaryEquivalencyStep.cs
Outdated
Show resolved
Hide resolved
Src/FluentAssertions/Equivalency/Steps/GenericDictionaryEquivalencyStep.cs
Outdated
Show resolved
Hide resolved
Src/FluentAssertions/Equivalency/Steps/GenericDictionaryEquivalencyStep.cs
Outdated
Show resolved
Hide resolved
How can a refactoring commit be a "non-rework" of previous commits? 🤔 |
685f631
to
274958c
Compare
@dennisdoomen I have combined all commits to one, because I had no clue, how I could add refactoring commits, but not interfere (or non-rework) with changes in previous commits. Sorry :/ But I am happy if you could point me into the correct direction (for PRs in future) |
Using fixup commits and interactive squashing. See https://www.continuousimprover.com/2020/03/keep-source-control-history-clean.html |
Src/FluentAssertions/Equivalency/Steps/GenericDictionaryEquivalencyStep.cs
Outdated
Show resolved
Hide resolved
Src/FluentAssertions/Equivalency/Steps/GenericDictionaryEquivalencyStep.cs
Outdated
Show resolved
Hide resolved
Src/FluentAssertions/Equivalency/Steps/GenericDictionaryEquivalencyStep.cs
Outdated
Show resolved
Hide resolved
7202a4e
to
27b8e12
Compare
27b8e12
to
02dbd12
Compare
Qodana for .NETIt seems all right 👌 No new problems were found according to the checks applied 💡 Qodana analysis was run in the pull request mode: only the changed files were checked View the detailed Qodana reportTo be able to view the detailed Qodana report, you can either:
To get - name: 'Qodana Scan'
uses: JetBrains/qodana-action@v2023.2.8
with:
upload-result: true Contact Qodana teamContact us at qodana-support@jetbrains.com
|
Src/FluentAssertions/Equivalency/Steps/GenericDictionaryEquivalencyStep.cs
Show resolved
Hide resolved
…`dictionary` expectation
Co-authored-by: Jonas Nyrup <jnyrup@users.noreply.github.com>
02dbd12
to
cda8236
Compare
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.
Great work!
Dennis is conferencing these days, so he's pretty occupied.
https://twitter.com/ddoomen/status/1712069826494050455
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.
Nice work. It's always hard to keep a clean PR when moving around code and fixing bugs. Becoming proficient with fixup commits and interactive rebases is a skill you wonder why you never used it before.
Src/FluentAssertions/Equivalency/Steps/GenericDictionaryEquivalencyStep.cs
Show resolved
Hide resolved
…pectation (fluentassertions#2358) * Handle non-generic `dictionary` subject when compared with a generic `dictionary` expectation * Add release notes Co-authored-by: Jonas Nyrup <jnyrup@users.noreply.github.com> --------- Co-authored-by: Jonas Nyrup <jnyrup@users.noreply.github.com>
…pectation (fluentassertions#2358) * Handle non-generic `dictionary` subject when compared with a generic `dictionary` expectation * Add release notes Co-authored-by: Jonas Nyrup <jnyrup@users.noreply.github.com> --------- Co-authored-by: Jonas Nyrup <jnyrup@users.noreply.github.com>
…pectation (fluentassertions#2358) * Handle non-generic `dictionary` subject when compared with a generic `dictionary` expectation * Add release notes Co-authored-by: Jonas Nyrup <jnyrup@users.noreply.github.com> --------- Co-authored-by: Jonas Nyrup <jnyrup@users.noreply.github.com>
…pectation (fluentassertions#2358) * Handle non-generic `dictionary` subject when compared with a generic `dictionary` expectation * Add release notes Co-authored-by: Jonas Nyrup <jnyrup@users.noreply.github.com> --------- Co-authored-by: Jonas Nyrup <jnyrup@users.noreply.github.com>
…pectation (fluentassertions#2358) * Handle non-generic `dictionary` subject when compared with a generic `dictionary` expectation * Add release notes Co-authored-by: Jonas Nyrup <jnyrup@users.noreply.github.com> --------- Co-authored-by: Jonas Nyrup <jnyrup@users.noreply.github.com>
…pectation (#2358) * Handle non-generic `dictionary` subject when compared with a generic `dictionary` expectation * Add release notes Co-authored-by: Jonas Nyrup <jnyrup@users.noreply.github.com> --------- Co-authored-by: Jonas Nyrup <jnyrup@users.noreply.github.com>
Fixes: #2308
Note: The very first two commits are to fix the actual problem. Commit 3-6 are for code quality (and therefore can moved to a separate PR if needed).IMPORTANT
./build.sh --target spellcheck
or.\build.ps1 --target spellcheck
before pushing and check the good outcome