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: trueContact 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: trueContact 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
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 spellcheckor.\build.ps1 --target spellcheckbefore pushing and check the good outcome