public void Add() { var dictionary = new IntIntSortDic(); dictionary.Add(new System.Collections.Generic.KeyValuePair <int, int>(1, 100)); dictionary.Add(2, 200); Assert.AreEqual(dictionary[1], 100); Assert.AreEqual(dictionary[2], 200); }
public void Contains() { var dictionary = new IntIntSortDic(); System.Collections.Generic.KeyValuePair <int, int> value = new System.Collections.Generic.KeyValuePair <int, int>(1, 27); dictionary.Add(value); Assert.IsTrue(dictionary.Contains(value)); }
private IntIntSortDic CreateTestDictionary() { var dictionary = new IntIntSortDic(); for (var i = 0; i < 25; i++) { dictionary.Add(i, i + 26); } return(dictionary); }