Fix JsonPartialMatcher when using property names with dot (#1216)

Fix JsonPartialMatcher when using property names with dot (#1216)
This commit is contained in:
Stef Heyenrath
2024-12-06 09:23:31 +01:00
committed by GitHub
parent 4b3e9feca0
commit 7f640dfa0d
2 changed files with 18 additions and 1 deletions

View File

@@ -293,6 +293,23 @@ public class JsonPartialMatcherTests
Assert.Equal(1.0, match);
}
[Fact]
public void JsonPartialMatcher_IsMatch_JObjectAsStringWithDottedPropertyName()
{
// Assign
var matcher = new JsonPartialMatcher("{ \"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User\" : \"Test\" }");
// Act
var jObject = new JObject
{
{ "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User", new JValue("Test") }
};
var match = matcher.IsMatch(jObject).Score;
// Assert
Assert.Equal(1.0, match);
}
[Fact]
public void JsonPartialMatcher_IsMatch_GuidAsString()
{