コード例 #1
0
        public void Validate_Throws_ASVE_If_Name_Is_Not_Set()
        {
            //Arrange
            var attribute = new SimpleAttribute(AttributeTypes.Binary)
            {
                Values = new List <string> {
                    "1777"
                }
            };

            //Act
            attribute.ToAdsml();
        }
コード例 #2
0
        public void Can_Generate_Api_Xml_Without_Value()
        {
            //Arrange
            var expected = new XElement("SimpleAttribute",
                                        new XAttribute("name", "objectTypeId"),
                                        new XAttribute("type", "integer")).ToString();

            var attribute = new SimpleAttribute(AttributeTypes.Integer)
            {
                Name = "objectTypeId"
            };

            //Act
            var actual = attribute.ToAdsml().ToString();

            Console.WriteLine(actual);

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