Пример #1
0
        public void XMLParseGetElement()
        {
            var xmlElementResult = xmlParse.GetElement(xDocument);

            Assert.AreEqual("DUB", xmlElementResult.Element);
            Assert.IsNull(xmlElementResult.ErrorMessage);
        }
Пример #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);
        }