Utility class to represent a RedDotObject through its name and guid. E.g. used for client side representation or tests.
Inheritance: IRedDotObject
Ejemplo n.º 1
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);
        }