Exemplo n.º 1
0
        public void EvenDistributionMRU()
        {
            var cache = CacheBuilder.SetAssociative_MRU <int, int>(3, 3);

            //add 1 to 12
            for (int i = 1; i <= 12; i++)
            {
                cache.Add(i, i);
            }

            //verify keys 7 to 9 are gone
            for (int i = 7; i <= 9; i++)
            {
                Assert.False(cache.ContainsKey(i));
            }
        }