Esempio n. 1
0
        public void XMLParseGetAttribute()
        {
            var xmlAttributeResult = xmlParse.GetAttribute(xDocument);

            Assert.AreEqual("DEFAULT", xmlAttributeResult.Attribute);
            Assert.IsNull(xmlAttributeResult.ErrorMessage);
        }
Esempio n. 2
0
        public (string XmlValid, string DeclarationCommand, string SiteId) XmlValidationOperation(XElement xElement, InputDocument checkConstraints)
        {
            var validation       = xmlValidation.XmlValidate(xElement);
            var validationResult = validation.IsSuccess == true ? "0" : validation.ErrorMessage;

            var declarationCommand       = xmlParse.GetAttribute(xElement);
            var declarationCommandResult = declarationCommand.Attribute == checkConstraints.Command ? "0" : "-1";

            var site       = xmlParse.GetElement(xElement);
            var siteResult = site.Element == checkConstraints.SiteId ? "0" : "-2";

            return(validationResult, declarationCommandResult, siteResult);
        }