Exemplo n.º 1
0
        public void ValidateRandomDocument_Fails()
        {
            var validator = new EspdXmlValidator();
            var document  = new XDocument(new XElement("QualificationApplicationRequest", new XElement("id", "jeejee")));
            var result    = validator.ValidateQualificationApplicationRequest(document);

            foreach (var error in result.Errors)
            {
                Console.WriteLine("Error:" + error);
            }

            Assert.IsFalse(result.IsSuccess, "Validation should fail");
        }
Exemplo n.º 2
0
        public void ValidateInvalidIncompleteRequest_Fail()
        {
            var qar       = Create.SimpleQualificationApplicationRequest;
            var document  = qar.Serialize();
            var validator = new EspdXmlValidator();
            var result    = validator.ValidateQualificationApplicationRequest(document);

            foreach (var error in result.Errors)
            {
                Console.WriteLine("Error:" + error);
            }

            Assert.IsFalse(result.IsSuccess, "Validation should fail");
        }
Exemplo n.º 3
0
        public void ValidateCriteriaTaxonomyExtended_Pass()
        {
            var qar       = Create.CriteriaTaxonomyExtendedV2_1_1;
            var document  = qar.Serialize();
            var validator = new EspdXmlValidator();
            var result    = validator.ValidateQualificationApplicationRequest(document);

            foreach (var error in result.Errors)
            {
                Console.WriteLine("Error:" + error);
            }

            Assert.IsTrue(result.IsSuccess, "Validation should succeed");
        }