From 965c8f3348afaf2dd44e8a203ffce1bb07bb6be2 Mon Sep 17 00:00:00 2001 From: Alexander Zautke Date: Fri, 10 Jan 2025 20:50:05 +0300 Subject: [PATCH] Update SnapshotGeneratorTest.cs --- .../Snapshot/SnapshotGeneratorTest.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/Hl7.Fhir.Specification.Shared.Tests/Snapshot/SnapshotGeneratorTest.cs b/src/Hl7.Fhir.Specification.Shared.Tests/Snapshot/SnapshotGeneratorTest.cs index 5dd81d8af..b23d1ab9a 100644 --- a/src/Hl7.Fhir.Specification.Shared.Tests/Snapshot/SnapshotGeneratorTest.cs +++ b/src/Hl7.Fhir.Specification.Shared.Tests/Snapshot/SnapshotGeneratorTest.cs @@ -282,6 +282,19 @@ public async Tasks.Task TestConstraintSources() } + [TestMethod] + public async T.Task TestConstraintSourceDom6() + { + var communication = await _testResolver.FindStructureDefinitionAsync("http://hl7.org/fhir/StructureDefinition/Communication"); + _generator = new SnapshotGenerator(_testResolver, _settings); + + var snapshot = await _generator.GenerateAsync(communication); + + Assert.IsTrue(communication.Snapshot?.Element + .Where(e => e.Path == "Communication").FirstOrDefault() + .Constraint.Any(c => c.Key == "dom-6" && c.Source == "http://hl7.org/fhir/StructureDefinition/DomainResource") == true); + } + [TestMethod] public async Tasks.Task GenerateSnapshotForExternalProfiles() { @@ -10255,4 +10268,4 @@ private StructureDefinition createR5StructureDefinition() }; } } -} \ No newline at end of file +}