public void Can_Generate_Api_Xml()
        {
            //Arrange
            var expected = new XElement("LanguagesToReturn", new XElement("Language", new XAttribute("id", "10")));
            var asc      = new LanguageControl(LanguageToReturn.WithLanguageId(10));

            //Act
            var actual = asc.ToAdsml();

            //Assert
            Assert.That(actual.ToString(), Is.EqualTo(expected.ToString()));
        }
        public void Can_Generate_Api_Xml_With_Outer_Node_XAttributes()
        {
            //Arrange
            var expected = new XElement("LanguagesToReturn", new XAttribute("foo", "bar"),
                                        new XElement("Language", new XAttribute("id", "10")));

            var asc = new LanguageControl(LanguageToReturn.WithLanguageId(10))
            {
                OuterNodeAttributes = new List <XAttribute> {
                    new XAttribute("foo", "bar")
                }
            };

            //Act
            var actual = asc.ToAdsml();

            //Assert
            Assert.That(actual.ToString(), Is.EqualTo(expected.ToString()));
        }