public void Ctor_SyndicationCategory_WithNoAttributeExtensions()
        {
            var content = new SyndicationContentSubclass();

            SyndicationContentSubclass clone = new SyndicationContentSubclass(content);

            Assert.Equal(0, clone.AttributeExtensions.Count);
        }
        public void WriteTo_EmptyOrNullName_ThrowsArgumentException(string outerElementName)
        {
            var content = new SyndicationContentSubclass();

            using (var stringWriter = new StringWriter())
                using (XmlWriter writer = XmlWriter.Create(stringWriter))
                {
                    AssertExtensions.Throws <ArgumentException>("outerElementName", null, () => content.WriteTo(writer, outerElementName, "outerElementNamespace"));
                }
        }
        public void Ctor_SyndicationCategory_WithAttributeExtensions()
        {
            var content = new SyndicationContentSubclass();

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

            SyndicationContentSubclass clone = new SyndicationContentSubclass(content);

            Assert.Equal(1, clone.AttributeExtensions.Count);
            Assert.Equal("value", clone.AttributeExtensions[new XmlQualifiedName("name")]);
        }
        public void WriteTo_Invoke_Success(Dictionary <XmlQualifiedName, string> attributeExtensions, string outerElementName, string outerElementNamespace, string expected)
        {
            var content = new SyndicationContentSubclass();

            if (attributeExtensions != null)
            {
                foreach (XmlQualifiedName name in attributeExtensions.Keys)
                {
                    content.AttributeExtensions.Add(name, attributeExtensions[name]);
                }
            }
            CompareHelper.AssertEqualWriteOutput(expected, writer => content.WriteTo(writer, outerElementName, outerElementNamespace));
        }
        public void WriteTo_NullWriter_ThrowsArgumentNullException()
        {
            var content = new SyndicationContentSubclass();

            AssertExtensions.Throws <ArgumentNullException>("writer", () => content.WriteTo(null, "outerElementName", "outerElementNamespace"));
        }
 public SyndicationContentSubclass(SyndicationContentSubclass source) : base(source)
 {
 }
        public void Ctor_Default()
        {
            var content = new SyndicationContentSubclass();

            Assert.Empty(content.AttributeExtensions);
        }