void Validate() { String savePath = $"\\Temp\\test.json"; FhirValidator fv = new FhirValidator(); fv.Validate("4.0.0", savePath); StringBuilder sb = new StringBuilder(); bool success = fv.FormatMessages(sb); Trace.WriteLine(sb.ToString()); Assert.True(success); Trace.WriteLine("Validation complete"); }
public void G_ValidateAcrExamples() { FhirValidator fv = new FhirValidator(Path.Combine(this.cacheDir, "validation.xml")); fv.StatusErrors += this.StatusErrors; fv.StatusInfo += this.StatusInfo; fv.StatusWarnings += this.StatusWarnings; fv.ValidatorArgs = $" -ig {resourcesDir} -ig {acrResourcesDir}"; // C:\Development\HL7\BreastRadiologyProfilesV2\IG\Guide\input bool success = fv.ValidateDir(this.acrExamplesDir, "*.json", "4.0.0"); StringBuilder sb = new StringBuilder(); fv.FormatMessages(sb); Trace.WriteLine(sb.ToString()); Assert.IsTrue(success); }
public void D5_ValidateAcr() { // IGBuilder.RemoveFragmentExtensions(this.acrResourcesDir); FhirValidator fv = new FhirValidator(Path.Combine(this.cacheDir, "validation.xml")); fv.StatusErrors += this.StatusErrors; fv.StatusInfo += this.StatusInfo; fv.StatusWarnings += this.StatusWarnings; bool success = fv.ValidateDir(this.acrResourcesDir, "*.json", "4.0.0"); StringBuilder sb = new StringBuilder(); fv.FilterMessages("not resolve"); fv.FormatMessages(sb); Trace.WriteLine(sb.ToString()); Assert.IsTrue(success); Trace.WriteLine("Validation complete"); }