Example #1
0
        public void Can_Generate_Api_Xml()
        {
            //Arrange
            var expected = new XElement("ReferenceControls", new XAttribute("valueOnly", "true"));
            var asc      = new ReferenceControl(ReferenceOptions.ReturnValuesOnly());

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

            //Assert
            Assert.That(actual.ToString(), Is.EqualTo(expected.ToString()));
        }
Example #2
0
        public void Can_Generate_Api_Xml_With_Outer_Node_XAttributes()
        {
            //Arrange
            var expected = new XElement("ReferenceControls", new XAttribute("foo", "bar"), new XAttribute("valueOnly", "true"));
            var asc      = new ReferenceControl(ReferenceOptions.ReturnValuesOnly())
            {
                OuterNodeAttributes = new List <XAttribute> {
                    new XAttribute("foo", "bar")
                }
            };

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

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