-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2760 from FirelyTeam/feature/fhirpath-environment…
…-vars Added fhirpath environment vars
- Loading branch information
Showing
8 changed files
with
65 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using Hl7.Fhir.ElementModel; | ||
using Hl7.FhirPath; | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
using System.Collections.Generic; | ||
|
||
namespace HL7.FhirPath.Tests.Tests; | ||
|
||
[TestClass] | ||
public class EnviromentTests | ||
{ | ||
[TestMethod] | ||
public void TestEnvironment() | ||
{ | ||
var compiler = new FhirPathCompiler(); | ||
var expr = compiler.Compile("%%var = 1"); | ||
|
||
expr.IsTrue(null, new EvaluationContext(null, null, new Dictionary<string, IEnumerable<ITypedElement>> { { "var", new [] { ElementNode.ForPrimitive(1) } } })); | ||
expr.IsBoolean(false, null, new EvaluationContext(null, null, new Dictionary<string, IEnumerable<ITypedElement>> { { "var", new[] { ElementNode.ForPrimitive(2) } } })); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters