Exemple #1
0
        public void CheckIfClearWorksCorrectly()
        {
            var hashList = new DataStructures.HashingListDictionary <int, string>(10);

            hashList.Add(1, "Ana");
            hashList.Add(11, "Andrei");
            hashList.Clear();
            Assert.False(hashList.ContainsKey(1) || hashList.ContainsKey(11));
        }
Exemple #2
0
        public void CheckIfContainsKeyExceptionsWorkCorrectly()
        {
            var hashList = new DataStructures.HashingListDictionary <string, string>(10);

            hashList.Add("1", "Ana");
            const string key = null;

            Assert.Throws <ArgumentNullException>(() => hashList.ContainsKey(key));
        }