Skip to content

Commit

Permalink
Add thing discovery match test with blank and invisible characters.
Browse files Browse the repository at this point in the history
  • Loading branch information
pgaufillet committed May 25, 2024
1 parent ca8f8d0 commit d79726a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,11 @@ public void testMatcher()
properties = new HashMap<>();
properties.put(Thing.PROPERTY_VENDOR, "Vendor3");
assertEquals(null, matcher.matchThingType(properties));

// Match with invisible characters
properties = new HashMap<>();
properties.put(Thing.PROPERTY_VENDOR, "Vendor4");
properties.put(Thing.PROPERTY_MODEL_ID, "Model3");
assertEquals(new ThingTypeUID("zigbee:type5"), matcher.matchThingType(properties));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ type1,vendor=Vendor1,modelId=Model1
type2,vendor=Vendor2,modelId=Model2
type3,vendor=Vendor1,modelId=Model2
type4,vendor=Vendor1,modelId=Model2,firmwareVersion=Version4
type5,vendor=\u001F Vendor4,modelId= Model3\u001F

0 comments on commit d79726a

Please sign in to comment.