Skip to content

Make JTokenDifferentiator an instance class#63

Merged
jnyrup merged 1 commit intofluentassertions:masterfrom
jnyrup:JTokenDifferentiator
Feb 26, 2022
Merged

Make JTokenDifferentiator an instance class#63
jnyrup merged 1 commit intofluentassertions:masterfrom
jnyrup:JTokenDifferentiator

Conversation

@jnyrup
Copy link
Member

@jnyrup jnyrup commented Feb 26, 2022

Make JTokenDifferentiator an instance class to reduce the number of arguments passed around.

@jnyrup jnyrup requested a review from dennisdoomen February 26, 2022 16:50
bool match = false;
for (int actualIndex = matchingIndex; actualIndex < actualChildren.Length; actualIndex++)
{
var difference = FindFirstDifference(actualChildren[actualIndex], expectedChild, true, config);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CompareExpectedItems is only called when ignoreExtraProperties is true, so the three true literals in this method always corresponds to the value of ignoreExtraProperties.

for (int i = 0; i < actualChildren.Length; i++)
{
Difference firstDifference = FindFirstDifference(actualChildren[i], expectedChildren[i],
path.AddIndex(i), false, config);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CompareItems is only called when ignoreExtraProperties is false.

@coveralls
Copy link

coveralls commented Feb 26, 2022

Pull Request Test Coverage Report for Build 1903789818

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.03%) to 90.164%

Totals Coverage Status
Change from base Build 1900756004: 0.03%
Covered Lines: 174
Relevant Lines: 179

💛 - Coveralls

@jnyrup jnyrup force-pushed the JTokenDifferentiator branch from d35d92a to e9e4310 Compare February 26, 2022 18:06
@jnyrup jnyrup merged commit 600b0af into fluentassertions:master Feb 26, 2022
@jnyrup jnyrup deleted the JTokenDifferentiator branch February 26, 2022 18:24
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.

3 participants