Skip to content

Commit

Permalink
remove redundant ascending (#4287)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp authored Dec 9, 2024
1 parent aa671a8 commit e871a5e
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ public void ConcatenatingDictionariesReturnsSourceSideWhenOverwriteIsNullOrEmpty

IDictionary<string, string> actual = source.ConcatWithOverwrites(overwrite, nameof(source), nameof(overwrite));

IOrderedEnumerable<KeyValuePair<string, string>> sortedActual = from entry in actual orderby entry.Key ascending select entry;
IOrderedEnumerable<KeyValuePair<string, string>> sortedSource = from entry in source orderby entry.Key ascending select entry;
IOrderedEnumerable<KeyValuePair<string, string>> sortedActual = from entry in actual orderby entry.Key select entry;
IOrderedEnumerable<KeyValuePair<string, string>> sortedSource = from entry in source orderby entry.Key select entry;
Verify(sortedActual.SequenceEqual(sortedSource));
}

Expand All @@ -52,8 +52,8 @@ public void ConcatenatingDictionariesReturnsOverwriteSideWhenSourceIsNullOrEmpty

IDictionary<string, string> actual = source.ConcatWithOverwrites(overwrite, nameof(source), nameof(overwrite));

IOrderedEnumerable<KeyValuePair<string, string>> sortedActual = from entry in actual orderby entry.Key ascending select entry;
IOrderedEnumerable<KeyValuePair<string, string>> sortedOverwrite = from entry in overwrite orderby entry.Key ascending select entry;
IOrderedEnumerable<KeyValuePair<string, string>> sortedActual = from entry in actual orderby entry.Key select entry;
IOrderedEnumerable<KeyValuePair<string, string>> sortedOverwrite = from entry in overwrite orderby entry.Key select entry;
Verify(sortedActual.SequenceEqual(sortedOverwrite));
}

Expand Down Expand Up @@ -84,8 +84,8 @@ public void ConcatenatingDictionariesShouldMergeThemAndTakeDuplicateKeysFromOver
["bbb"] = "overwrite",
};

IOrderedEnumerable<KeyValuePair<string, string>> sortedActual = from entry in actual orderby entry.Key ascending select entry;
IOrderedEnumerable<KeyValuePair<string, string>> sortedExpected = from entry in expected orderby entry.Key ascending select entry;
IOrderedEnumerable<KeyValuePair<string, string>> sortedActual = from entry in actual orderby entry.Key select entry;
IOrderedEnumerable<KeyValuePair<string, string>> sortedExpected = from entry in expected orderby entry.Key select entry;
Verify(sortedActual.SequenceEqual(sortedExpected));
}
}

0 comments on commit e871a5e

Please sign in to comment.