public static void String_LessThanWorks(string a, string b) { IReadOnlyList<char> A = a.ToList(); IReadOnlyList<char> B = b.ToList(); OrderedComparer<char> comparer = new OrderedComparer<char>(); Assert.True(comparer.Compare(A, B) < 0); Assert.True(comparer.Compare(B, A) > 0); }
public static void String_LessThanWorks(string a, string b) { IReadOnlyList <char> A = a.ToList(); IReadOnlyList <char> B = b.ToList(); OrderedComparer <char> comparer = new OrderedComparer <char>(); Assert.True(comparer.Compare(A, B) < 0); Assert.True(comparer.Compare(B, A) > 0); }
public int Compare( Func <string, int> keySelector, IComparer <int> keyComparer, bool descending, string x, string y) { var comparer = new OrderedComparer <string, int>( keySelector, keyComparer, descending); return(comparer.Compare(x, y)); }