public void TestElementWithParams()
        {
            var elem = new SsmlProsody("words", "volume", "rate", "pitch");

            Assert.AreEqual(
                "<?xml version=\"1.0\" encoding=\"utf-8\"?>" + Environment.NewLine +
                "<prosody volume=\"volume\" rate=\"rate\" pitch=\"pitch\">words</prosody>",
                elem.ToString()
                );
        }
        public void TestEmptyElement()
        {
            var elem = new SsmlProsody();

            Assert.AreEqual(
                "<?xml version=\"1.0\" encoding=\"utf-8\"?>" + Environment.NewLine +
                "<prosody></prosody>",
                elem.ToString()
                );
        }
        public void TestElementWithTextNode()
        {
            var elem = new SsmlProsody();

            elem.AddText("Here is the content");

            Assert.AreEqual(
                "<?xml version=\"1.0\" encoding=\"utf-8\"?>" + Environment.NewLine +
                "<prosody>Here is the content</prosody>",
                elem.ToString()
                );
        }
        public void TestElementWithExtraAttributes()
        {
            var elem = new SsmlProsody();

            elem.SetOption("newParam1", "value");
            elem.SetOption("newParam2", 1);

            Assert.AreEqual(
                "<?xml version=\"1.0\" encoding=\"utf-8\"?>" + Environment.NewLine +
                "<prosody newParam1=\"value\" newParam2=\"1\"></prosody>",
                elem.ToString()
                );
        }
        public void TestMixedContent()
        {
            var elem = new SsmlProsody();

            elem.AddText("before")
            .AddChild("Child").AddText("content");
            elem.AddText("after");

            Assert.AreEqual(
                "<?xml version=\"1.0\" encoding=\"utf-8\"?>" + Environment.NewLine +
                "<prosody>before<Child>content</Child>after</prosody>",
                elem.ToString()
                );
        }
        public void TestAllowGenericChildNodes()
        {
            var elem = new SsmlProsody();

            elem.AddChild("generic-tag").AddText("Content").SetOption("tag", true);

            Assert.AreEqual(
                "<?xml version=\"1.0\" encoding=\"utf-8\"?>" + Environment.NewLine +
                "<prosody>" + Environment.NewLine +
                "  <generic-tag tag=\"True\">Content</generic-tag>" + Environment.NewLine +
                "</prosody>",
                elem.ToString()
                );
        }