Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nikoraes committed Sep 5, 2024
1 parent 8049c6d commit 8d4c35c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion JexlNet.Test/ExtendedGrammar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ public void ComplexMapExample2()
{
var jexl = new Jexl(new ExtendedGrammar());
string context = """{"data": [{"id": 18833,"name": "NL-238409_RAW_3296_08","variableId": 167147,"variableName": "3296_08_X", "data": { "2024-09-05 13:25:00": 1992.5402 } }, { "id": 18833, "name": "NL-238409_RAW_3296_08", "variableId": 167148, "variableName": "3296_08_Y", "data": { "2024-09-05 13:25:00": 5090.9231 } }]}""";
string expression = """data|find('!value.variableName|startsWith(\\'d\\') && value.variableName|endsWith(\\'X\\')').data|values[0]""";
string expression = """data|find('!value.variableName|startsWith(\'d\') && value.variableName|endsWith(\'X\')').data|values[0]""";
var result = jexl.Eval(expression, context);
var expected = 1992.5402;
Assert.Equal(expected, result.AsValue().ToDouble());
Expand Down

0 comments on commit 8d4c35c

Please sign in to comment.