Skip to content

Remove ModifySerialization - #533

Merged
SimonCropp merged 3 commits into
mainfrom
remove-modify-serialization
Jun 1, 2022
Merged

Remove ModifySerialization#533
SimonCropp merged 3 commits into
mainfrom
remove-modify-serialization

Conversation

@SimonCropp

@SimonCropp SimonCropp commented Jun 1, 2022

Copy link
Copy Markdown
Member

VerifySettings

Before

var settings = new VerifySettings();
settings.ModifySerialization(_ =>
{
    _.DontScrubDateTimes();
    _.DontIgnoreFalse();
    _.DontScrubGuids();
    _.DontIgnoreEmptyCollections();
    _.IgnoreMember<Target>(x => x.Property);
});

After

var settings = new VerifySettings();
settings.DontIgnoreEmptyCollections();
settings.DontScrubGuids();
settings.DontScrubDateTimes();
settings.DontIgnoreFalse();
settings.IgnoreMember<Target>(x => x.Property);

VerifierSettings

Before

VerifierSettings.ModifySerialization(_ =>
{
    _.DontScrubDateTimes();
    _.DontIgnoreFalse();
    _.DontScrubGuids();
    _.DontIgnoreEmptyCollections();
    _.IgnoreMember<Target>(x => x.Property);
});

After

VerifierSettings.DontIgnoreEmptyCollections();
VerifierSettings.DontScrubGuids();
VerifierSettings.DontScrubDateTimes();
VerifierSettings.DontIgnoreFalse();
VerifierSettings.IgnoreMember<Target>(x => x.Property);

Fluent

Before

return Verify(target)
    .ModifySerialization(_ =>
    {
        _.DontScrubDateTimes();
        _.DontIgnoreFalse();
        _.DontScrubGuids();
        _.DontIgnoreEmptyCollections();
        _.IgnoreMember<Target>(x => x.Property);
    });

After

return Verify(target)
    .DontScrubDateTimes()
    .DontIgnoreFalse()
    .DontScrubGuids()
    .DontIgnoreEmptyCollections()
    .IgnoreMember<Target>(x => x.Property);

@SimonCropp SimonCropp added this to the 17.0.0 milestone Jun 1, 2022
@SimonCropp
SimonCropp merged commit 5b52aea into main Jun 1, 2022
@SimonCropp
SimonCropp deleted the remove-modify-serialization branch June 1, 2022 12:10
steverichey added a commit to corgibytes/freshli-lib that referenced this pull request Sep 6, 2022
ModifySerialization removed: VerifyTests/Verify#533
DontScrubNumericIds removed: VerifyTests/Verify#526
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant