From 30bc64372bce646c18649a4701c8247214f003ae Mon Sep 17 00:00:00 2001 From: Andreas Linde Date: Fri, 5 Jan 2024 19:04:29 +0100 Subject: [PATCH] Add more binding manager tests --- spine/binding_manager_test.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/spine/binding_manager_test.go b/spine/binding_manager_test.go index 3abd39d8..c1195c5f 100644 --- a/spine/binding_manager_test.go +++ b/spine/binding_manager_test.go @@ -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(),