Skip to content

Commit

Permalink
Add more binding manager tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DerAndereAndi committed Jan 5, 2024
1 parent 36642b0 commit 30bc643
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions spine/binding_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,18 @@ func (suite *BindingManagerSuite) Test_Bindings() {
subs = bindingMgr.Bindings(suite.remoteDevice)
assert.Equal(suite.T(), 1, len(subs))

address := model.FeatureAddressType{
Device: entity.Device().Address(),
Entity: entity.Address().Entity,
Feature: util.Ptr(model.AddressFeatureType(10)),
}
entries := bindingMgr.BindingsOnFeature(address)
assert.Equal(suite.T(), 0, len(entries))

address.Feature = localFeature.Address().Feature
entries = bindingMgr.BindingsOnFeature(address)
assert.Equal(suite.T(), 1, len(entries))

bindingDelete := model.BindingManagementDeleteCallType{
ClientAddress: remoteFeature.Address(),
ServerAddress: localFeature.Address(),
Expand Down

0 comments on commit 30bc643

Please sign in to comment.