Exemplo n.º 1
0
        public void Categories_AddNonNullItem_Success()
        {
            Collection <SyndicationCategory> collection = new InlineCategoriesDocument().Categories;

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

            collection.Add(new SyndicationCategory());

            AssertExtensions.Throws <ArgumentNullException>("item", () => collection[0] = null);
        }
Exemplo n.º 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]);
        }