public void Clear_Empty() { var list = new SortingListDictionary <WrappedInt, string>(); list.Clear(); Assert.Empty(list); }
public void Factory_Wrap_AssumeSorted() { var list = SortingListDictionary <WrappedInt, string> .Factory_Wrap_AssumeSorted( TypicalSortedKeys(), TypicalSortedValues()); Assert.Equal(TypicalCount, list.Count); Assert.True(Typical().SequenceEqual(list)); }
public void Factory_Wrap_AssumeSorted_But_Not() { var badInts = new int[] { 4, 2, 5 }; var list = SortingListDictionary <int, string> .Factory_Wrap_AssumeSorted( new List <int>(badInts), TypicalSortedValues()); Assert.Equal(badInts.Length, list.Count); Assert.True(badInts.SequenceEqual(list.Keys)); Assert.True(TypicalSortedValues().SequenceEqual(list.Values)); }
public SortingListDictionary <WrappedInt, string> Typical() { return(SortingListDictionary <WrappedInt, string> .Factory_Wrap_AssumeSorted( TypicalSortedKeys(), TypicalSortedValues())); }
public void ContainsKey_Empty() { var list = new SortingListDictionary <int, string>(); Assert.False(list.ContainsKey(4)); }
public void IndexOf_Empty() { var list = new SortingListDictionary <int, string>(); Assert.Equal(-1, list.IndexOf(4)); }