Ejemplo n.º 1
0
        public void Demonstrate_that_copies_are_equals()
        {
            ICache cache = new PerpetualCache();
            cache = new SharedCache(cache);

            for (int i = 0; i < 100000; i++)
            {
                cache[i] = i;
                Assert.That(cache[i], Is.EqualTo(i));
            }
        }
Ejemplo n.º 2
0
        public void Demonstrate_that_copies_are_equals()
        {
            ICache cache = new WeakCache();
            cache = new SharedCache(cache);

            for (int i = 0; i < 100000; i++)
            {
                cache[i] = i;
                object value = cache[i];
                Assert.That(value, Is.Null | Is.EqualTo(i));
            }
        }