public void Categories_AddNonNullItem_Success()
        {
            Collection <CategoriesDocument> collection = new ResourceCollectionInfo().Categories;

            collection.Add(new InlineCategoriesDocument());
            Assert.Equal(1, collection.Count);
        }
        public void Accepts_AddNonNullItem_Success()
        {
            Collection <string> collection = new ResourceCollectionInfo().Accepts;

            collection.Add("value");
            Assert.Equal(1, collection.Count);
        }
        public void Categories_SetNullItem_ThrowsArgumentNullException()
        {
            Collection <CategoriesDocument> collection = new ResourceCollectionInfo().Categories;

            collection.Add(new InlineCategoriesDocument());

            AssertExtensions.Throws <ArgumentNullException>("item", () => collection[0] = null);
        }
        public void Accepts_SetNullItem_ThrowsArgumentNullException()
        {
            Collection <string> collection = new ResourceCollectionInfo().Accepts;

            collection.Add("value");

            AssertExtensions.Throws <ArgumentNullException>("item", () => collection[0] = null);
        }
        public void Accepts_SetNonNullItem_GetReturnsExpected()
        {
            Collection <string> collection = new ResourceCollectionInfo().Accepts;

            collection.Add("value");

            collection[0] = "newValue";
            Assert.Equal("newValue", collection[0]);
        }
        public void Categories_SetNonNullItem_GetReturnsExpected()
        {
            Collection <CategoriesDocument> collection = new ResourceCollectionInfo().Categories;

            collection.Add(new InlineCategoriesDocument());

            var newValue = new ReferencedCategoriesDocument();

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