Skip to content

Add Formatter for IDictionary#1577

Merged
jnyrup merged 1 commit intofluentassertions:developfrom
jnyrup:Issue1527
May 25, 2021
Merged

Add Formatter for IDictionary#1577
jnyrup merged 1 commit intofluentassertions:developfrom
jnyrup:Issue1527

Conversation

@jnyrup
Copy link
Copy Markdown
Member

@jnyrup jnyrup commented May 24, 2021

Copied and adjusted the EnumerableValueFormatter to handle instances of IDictionary.

With the addition of DictionaryValueFormatter the output of the included When_formatting_a_dictionary_it_should_format_keys_and_values changes from

{[FluentAssertions.Specs.Formatting.FormatterSpecs+MyKey, FluentAssertions.Specs.Formatting.FormatterSpecs+MyValue]}

to

{[
    FluentAssertions.Specs.Formatting.FormatterSpecs+MyKey
    {
        KeyProp = 13
    }] = 
    FluentAssertions.Specs.Formatting.FormatterSpecs+MyValue
    {
        ValueProp = 37
    }
}

Part of fixing #1527

@jnyrup jnyrup merged commit 501cf35 into fluentassertions:develop May 25, 2021
@jnyrup jnyrup deleted the Issue1527 branch May 25, 2021 07:13
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.

2 participants