public void Categories_AddNonNullItem_Success() { Collection <SyndicationCategory> collection = new InlineCategoriesDocument().Categories; collection.Add(new SyndicationCategory()); Assert.Equal(1, collection.Count); }
public void Categories_SetNullItem_ThrowsArgumentNullException() { Collection <SyndicationCategory> collection = new InlineCategoriesDocument().Categories; collection.Add(new SyndicationCategory()); AssertExtensions.Throws <ArgumentNullException>("item", () => collection[0] = null); }
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]); }