16
16
* limitations under the License.
17
17
*/
18
18
#include < app/EventManagement.h>
19
- #include < app/SubscriptionManager .h>
19
+ #include < app/SubscriptionsInfoProvider .h>
20
20
#include < app/icd/server/ICDConfigurationData.h>
21
21
#include < app/icd/server/ICDManager.h>
22
22
#include < app/icd/server/ICDNotifier.h>
@@ -71,16 +71,16 @@ class TestICDStateObserver : public app::ICDStateObserver
71
71
void OnICDModeChange () {}
72
72
};
73
73
74
- class TestSubscriptionManager : public SubscriptionManager
74
+ class TestSubscriptionsInfoProvider : public SubscriptionsInfoProvider
75
75
{
76
76
public:
77
- TestSubscriptionManager () = default ;
78
- ~TestSubscriptionManager (){};
77
+ TestSubscriptionsInfoProvider () = default ;
78
+ ~TestSubscriptionsInfoProvider (){};
79
79
80
80
void SetReturnValue (bool value) { mReturnValue = value; };
81
81
82
- bool SubjectHasActiveSubscription (const FabricIndex & aFabricIndex, const NodeId & subject) { return mReturnValue ; };
83
- bool SubjectHasPersistedSubscription (const FabricIndex & aFabricIndex, const NodeId & subject) { return mReturnValue ; };
82
+ bool SubjectHasActiveSubscription (FabricIndex aFabricIndex, NodeId subject) { return mReturnValue ; };
83
+ bool SubjectHasPersistedSubscription (FabricIndex aFabricIndex, NodeId subject) { return mReturnValue ; };
84
84
85
85
private:
86
86
bool mReturnValue = false ;
@@ -126,7 +126,7 @@ class TestContext : public chip::Test::AppContext
126
126
System::Clock::Internal::MockClock mMockClock ;
127
127
TestSessionKeystoreImpl mKeystore ;
128
128
app::ICDManager mICDManager ;
129
- TestSubscriptionManager mSubManager ;
129
+ TestSubscriptionsInfoProvider mSubManager ;
130
130
TestPersistentStorageDelegate testStorage;
131
131
132
132
private:
@@ -198,7 +198,7 @@ class TestICDManager
198
198
199
199
// Set New durations for test case
200
200
uint32_t oldActiveModeDuration_ms = icdConfigData.GetActiveModeDurationMs ();
201
- icdConfigData.SetModeDurations (0 , icdConfigData. GetIdleModeDurationSec () );
201
+ icdConfigData.SetModeDurations (MakeOptional ( static_cast < uint32_t >( 0 )), NullOptional );
202
202
203
203
// Verify That ICDManager starts in Idle
204
204
NL_TEST_ASSERT (aSuite, ctx->mICDManager .mOperationalState == ICDManager::OperationalState::IdleMode);
@@ -256,7 +256,7 @@ class TestICDManager
256
256
NL_TEST_ASSERT (aSuite, ctx->mICDManager .mOperationalState == ICDManager::OperationalState::IdleMode);
257
257
258
258
// Reset Old durations
259
- icdConfigData.SetModeDurations (oldActiveModeDuration_ms, icdConfigData. GetIdleModeDurationSec () );
259
+ icdConfigData.SetModeDurations (MakeOptional ( oldActiveModeDuration_ms), NullOptional );
260
260
}
261
261
262
262
/* *
@@ -277,7 +277,7 @@ class TestICDManager
277
277
278
278
// Set New durations for test case
279
279
uint32_t oldActiveModeDuration_ms = icdConfigData.GetActiveModeDurationMs ();
280
- icdConfigData.SetModeDurations (0 , icdConfigData. GetIdleModeDurationSec () );
280
+ icdConfigData.SetModeDurations (MakeOptional ( static_cast < uint32_t >( 0 )), NullOptional );
281
281
282
282
// Verify That ICDManager starts in Idle
283
283
NL_TEST_ASSERT (aSuite, ctx->mICDManager .mOperationalState == ICDManager::OperationalState::IdleMode);
@@ -346,7 +346,7 @@ class TestICDManager
346
346
NL_TEST_ASSERT (aSuite, ctx->mICDManager .mOperationalState == ICDManager::OperationalState::IdleMode);
347
347
348
348
// Reset Old durations
349
- icdConfigData.SetModeDurations (oldActiveModeDuration_ms, icdConfigData. GetIdleModeDurationSec () );
349
+ icdConfigData.SetModeDurations (MakeOptional ( oldActiveModeDuration_ms), NullOptional );
350
350
}
351
351
352
352
static void TestKeepActivemodeRequests (nlTestSuite * aSuite, void * aContext)
0 commit comments