public void WriteContentsTo_NullWriter_ThrowsArgumentNullException()
        {
            var content = new XmlSyndicationContentSubclass("type", new SyndicationElementExtension(new ExtensionObject {
                Value = 10
            }));

            AssertExtensions.Throws <ArgumentNullException>("writer", () => content.WriteContentsToEntryPoint(null));
        }
        public void Ctor_XmlSyndicationContent_Empty()
        {
            var content = new SyndicationElementExtension(new ExtensionObject {
                Value = 10
            });
            var original = new XmlSyndicationContent("type", content);
            var clone    = new XmlSyndicationContentSubclass(original);

            Assert.Empty(clone.AttributeExtensions);
            Assert.Same(original.Extension, clone.Extension);
            Assert.Equal("type", clone.Type);
        }
        public void Ctor_XmlSyndicationContent_Full()
        {
            var content = new SyndicationElementExtension(new ExtensionObject {
                Value = 10
            });
            var original = new XmlSyndicationContent("type", content);

            original.AttributeExtensions.Add(new XmlQualifiedName("name"), "value");

            var clone = new XmlSyndicationContentSubclass(original);

            Assert.NotSame(clone.AttributeExtensions, original.AttributeExtensions);
            Assert.Equal(1, clone.AttributeExtensions.Count);
            Assert.Equal("value", clone.AttributeExtensions[new XmlQualifiedName("name")]);

            Assert.Same(original.Extension, clone.Extension);
            Assert.Equal("type", clone.Type);
        }