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

Remove ModifySerialization #533

Merged
merged 3 commits into from
Jun 1, 2022
Merged

Remove ModifySerialization #533

merged 3 commits into from
Jun 1, 2022

Conversation

SimonCropp
Copy link
Member

@SimonCropp SimonCropp commented Jun 1, 2022

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
Development

Successfully merging this pull request may close these issues.

None yet

1 participant