Skip to content

Commit

Permalink
Ensure there are attributes present
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewX192 committed Dec 23, 2023
1 parent 4ffbcca commit c75af9d
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public void testCapabilityConfiguredViaStrings() throws Exception {
DeviceDriver driver = factory.load("CapabilityStrings.driver");
AttributeMap attributes = driver.getBaseAttributes();

assertEquals(10, attributes.size());
assertTrue(DevicePowerCapability.SOURCE_BATTERY.equalsIgnoreCase(attributes.get(DevicePowerCapability.KEY_SOURCE)));
assertEquals(false, attributes.get(DevicePowerCapability.KEY_LINECAPABLE));
assertEquals("deadbolt", attributes.get(AttributeKey.create("doorlock:type", String.class)));
Expand All @@ -72,6 +73,7 @@ public void testCapabilityConfiguredViaObjects() throws Exception {
DeviceDriver driver = factory.load("CapabilityObjects.driver");
AttributeMap attributes = driver.getBaseAttributes();

assertEquals(10, attributes.size());
assertEquals(DevicePowerCapability.SOURCE_BATTERY, attributes.get(DevicePowerCapability.KEY_SOURCE));
assertEquals(false, attributes.get(DevicePowerCapability.KEY_LINECAPABLE));
assertEquals("deadbolt", attributes.get(AttributeKey.create("doorlock:type", String.class)));
Expand Down

0 comments on commit c75af9d

Please sign in to comment.