public void Calc_CaseInsensitive_ShouldBeCaseInsensitive() { // Arrange var source = new[] { "Lorem", "ipsum", "dolor", "sit", "posuere", "lorem", "ipSum", "dOlor", "SIT", "posuerE" }; var target = new WordsCalculator(); var wordsComparer = StringComparer.InvariantCultureIgnoreCase; // Act var actual = target.Calculate(source, wordsComparer); // Assert actual.ShouldBeEquivalentTo(new Dictionary <string, uint> { { "Lorem", 2 }, { "ipsum", 2 }, { "dolor", 2 }, { "sit", 2 }, { "posuere", 2 }, }); }
public void Calc_CaseInsensitiveCyrillic_ShouldBeCaseInsensitive() { // Arrange var source = new[] { "Что", "что" }; var target = new WordsCalculator(); var wordsComparer = StringComparer.InvariantCultureIgnoreCase; // Act var actual = target.Calculate(source, wordsComparer); // Assert actual.ShouldBeEquivalentTo(new Dictionary <string, uint> { { "Что", 2 } }); }