예제 #1
0
        public void Categories_AddNonNullItem_Success()
        {
            Collection <SyndicationCategory> collection = new InlineCategoriesDocument().Categories;

            collection.Add(new SyndicationCategory());
            Assert.Equal(1, collection.Count);
        }
예제 #2
0
        public void Categories_SetNullItem_ThrowsArgumentNullException()
        {
            Collection <SyndicationCategory> collection = new InlineCategoriesDocument().Categories;

            collection.Add(new SyndicationCategory());

            AssertExtensions.Throws <ArgumentNullException>("item", () => collection[0] = null);
        }
예제 #3
0
        public void Categories_SetNonNullItem_GetReturnsExpected()
        {
            Collection <SyndicationCategory> collection = new InlineCategoriesDocument().Categories;

            collection.Add(new SyndicationCategory());

            var newValue = new SyndicationCategory();

            collection[0] = newValue;
            Assert.Same(newValue, collection[0]);
        }