public void Should_not_find_any_matches_in_an_empty_list()
 {
     var items = new ArrayList();
     var result =
         new List<string>(items.Select<int, string>(item => item > 0 ? item.ToString() : Math.Abs(item).ToString()));
     Assert.IsEmpty(result);
 }
 public void Should_select_items_in_a_populated_list()
 {
     var items = new ArrayList
                     {
                         -1,
                         2,
                         -3
                     };
     var result =
         new List<string>(items.Select<int, string>(item => item > 0 ? item.ToString() : Math.Abs(item).ToString()));
     Assert.IsNotNull(result);
     Assert.AreEqual(items.Count, result.Count, "counts differ");
     Assert.AreEqual(Math.Abs((int)items[0]).ToString(), result[0], "item 0");
     Assert.AreEqual(Math.Abs((int)items[1]).ToString(), result[1], "item 1");
     Assert.AreEqual(Math.Abs((int)items[2]).ToString(), result[2], "item 2");
 }
 private static bool ContainsTokenSubset(ArrayList<QueryToken> subset, ArrayList<QueryToken> set)
 {
     IEqualityComparer<string> tokenComparer = new DefaultTokenComparer(
         DefaultTokenComparer.Options.ConvertUmlauts | 
         DefaultTokenComparer.Options.RemoveDiacritics
     );
     
     return Set<string>.Difference(
         new Set<string>(subset.Select(x => x.ToString()), tokenComparer), 
         new Set<string>(set.Select(x => x.ToString()), tokenComparer)
     ).Count == 0;
 }