Exemplo n.º 1
0
        public void CheckIfClearExceptionsWorkCorrectly()
        {
            var hashList = new DataStructures.HashingListDictionary <string, string>(10);

            hashList.MakeReadOnly();
            Assert.Throws <NotSupportedException>(() => hashList.Clear());
        }
Exemplo n.º 2
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));
        }