예제 #1
0
        public void RemoveTest()
        {
            StyleItemCollection target = GetStdCollection();
            StyleItemBase       item   = target[StyleKeys.BgItemKey]; //Assume there is more than one item
            bool expected = true;
            bool actual   = target.Remove(item);

            Assert.AreEqual(expected, actual);
            Assert.AreEqual(StdCollectionCount - 1, target.Count);
            Assert.IsFalse(target.Contains(item));
        }
예제 #2
0
        public void ContainsTest()
        {
            Style style = new Style();
            StyleItemCollection         target = new StyleItemCollection(style);
            IEnumerable <StyleItemBase> all    = GetStdCollection();

            target.AddRange(all);
            Assert.AreEqual(StdCollectionCount, target.Count);


            StyleItemBase item     = new Scryber.Styles.FillStyle();
            bool          expected = false;
            bool          actual   = target.Contains(item);

            Assert.AreEqual(expected, actual);
        }