Beispiel #1
0
 public void TestRDListRefresh()
 {
     var list = new CachedList<RedDotObjectHandle>(Objects, Caching.Enabled);
     list.Count();
     list.Count();
     list.Refresh();
     Assert.AreEqual(2, _callCount);
     list.Count();
     list.Count();
     Assert.AreEqual(2, _callCount);
 }
        public void TestRDListRefresh()
        {
            var list = new CachedList <RedDotObjectHandle>(Objects, Caching.Enabled);

            list.Count();
            list.Count();
            list.Refresh();
            Assert.AreEqual(2, _callCount);
            list.Count();
            list.Count();
            Assert.AreEqual(2, _callCount);
        }
        public void TestRDListWithCaching()
        {
            var list = new CachedList <RedDotObjectHandle>(Objects, Caching.Enabled);

            Assert.AreEqual(true, list.IsCachingEnabled);
            Assert.AreEqual(3, list.Count());
            Assert.AreEqual(1, _callCount);
            list.Count();
            Assert.AreEqual(1, _callCount);
            var newItem = new RedDotObjectHandle(Guid.Empty, "c");

            _objects.Add(newItem);
            list.Refresh();

            Assert.AreEqual(4, list.Count());
            Assert.AreEqual(2, _callCount);
        }
Beispiel #4
0
        public void TestRDListWithCaching()
        {
            var list = new CachedList<RedDotObjectHandle>(Objects, Caching.Enabled);

            Assert.AreEqual(true, list.IsCachingEnabled);
            Assert.AreEqual(3, list.Count());
            Assert.AreEqual(1, _callCount);
            list.Count();
            Assert.AreEqual(1, _callCount);
            var newItem = new RedDotObjectHandle(Guid.Empty, "c");
            _objects.Add(newItem);
            list.Refresh();

            Assert.AreEqual(4, list.Count());
            Assert.AreEqual(2, _callCount);
        }