public void TestElementWithChildren() { var elem = new Say(); elem.Break(SsmlBreak.StrengthEnum.None, "time"); elem.Emphasis("words", SsmlEmphasis.LevelEnum.Strong); elem.Lang("words", SsmlLang.XmlLangEnum.DaDk); elem.P("words"); elem.Phoneme("words", SsmlPhoneme.AlphabetEnum.Ipa, "ph"); elem.Prosody("words", "volume", "rate", "pitch"); elem.S("words"); elem.SayAs("words", SsmlSayAs.InterpretAsEnum.Character, SsmlSayAs.RoleEnum.Mdy); elem.Sub("words", "alias"); elem.W("words", "role"); Assert.AreEqual( "<?xml version=\"1.0\" encoding=\"utf-8\"?>" + Environment.NewLine + "<Say>" + Environment.NewLine + " <break strength=\"none\" time=\"time\"></break>" + Environment.NewLine + " <emphasis level=\"strong\">words</emphasis>" + Environment.NewLine + " <lang xml:lang=\"da-DK\">words</lang>" + Environment.NewLine + " <p>words</p>" + Environment.NewLine + " <phoneme alphabet=\"ipa\" ph=\"ph\">words</phoneme>" + Environment.NewLine + " <prosody volume=\"volume\" rate=\"rate\" pitch=\"pitch\">words</prosody>" + Environment.NewLine + " <s>words</s>" + Environment.NewLine + " <say-as interpret-as=\"character\" role=\"mdy\">words</say-as>" + Environment.NewLine + " <sub alias=\"alias\">words</sub>" + Environment.NewLine + " <w role=\"role\">words</w>" + Environment.NewLine + "</Say>", elem.ToString() ); }