Skip to content

Commit

Permalink
adapt to the recent changes in Thunder master branch
Browse files Browse the repository at this point in the history
  • Loading branch information
npoltorapavlo committed Jun 26, 2024
1 parent 9210a6b commit c6b490c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 17 deletions.
30 changes: 15 additions & 15 deletions PersistentStore/l0test/PersistentStoreTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ using ::WPEFramework::JsonData::PersistentStore::GetValueResultData;
using ::WPEFramework::JsonData::PersistentStore::SetNamespaceStorageLimitParamsData;
using ::WPEFramework::JsonData::PersistentStore::SetValueParamsData;
using ::WPEFramework::Plugin::PersistentStore;
using ::WPEFramework::PluginHost::ILocalDispatcher;
using ::WPEFramework::PluginHost::IDispatcher;
using ::WPEFramework::PluginHost::IPlugin;
using ::WPEFramework::RPC::IStringIterator;
using ::WPEFramework::RPC::IteratorType;
Expand Down Expand Up @@ -79,7 +79,7 @@ TEST_F(APersistentStore, GetsValueInDeviceScopeViaJsonRpc)
};
PublishedServiceType<PersistentStoreImplementation> metadata(WPEFramework::Core::System::MODULE_NAME, 1, 0, 0);
ASSERT_THAT(plugin->Initialize(service), Eq(""));
auto jsonRpc = plugin->QueryInterface<ILocalDispatcher>();
auto jsonRpc = plugin->QueryInterface<IDispatcher>();
ASSERT_THAT(jsonRpc, NotNull());
DeleteKeyParamsInfo params;
params.Namespace = kAppId;
Expand Down Expand Up @@ -116,7 +116,7 @@ TEST_F(APersistentStore, GetsValueInAccountScopeViaJsonRpc)
};
PublishedServiceType<PersistentStoreImplementation> metadata(WPEFramework::Core::System::MODULE_NAME, 1, 0, 0);
ASSERT_THAT(plugin->Initialize(service), Eq(""));
auto jsonRpc = plugin->QueryInterface<ILocalDispatcher>();
auto jsonRpc = plugin->QueryInterface<IDispatcher>();
ASSERT_THAT(jsonRpc, NotNull());
DeleteKeyParamsInfo params;
params.Scope = WPEFramework::JsonData::PersistentStore::ScopeType::ACCOUNT;
Expand Down Expand Up @@ -154,7 +154,7 @@ TEST_F(APersistentStore, SetsValueInDeviceScopeViaJsonRpc)
};
PublishedServiceType<PersistentStoreImplementation> metadata(WPEFramework::Core::System::MODULE_NAME, 1, 0, 0);
ASSERT_THAT(plugin->Initialize(service), Eq(""));
auto jsonRpc = plugin->QueryInterface<ILocalDispatcher>();
auto jsonRpc = plugin->QueryInterface<IDispatcher>();
ASSERT_THAT(jsonRpc, NotNull());
SetValueParamsData params;
params.Namespace = kAppId;
Expand Down Expand Up @@ -189,7 +189,7 @@ TEST_F(APersistentStore, SetsValueInAccountScopeViaJsonRpc)
};
PublishedServiceType<PersistentStoreImplementation> metadata(WPEFramework::Core::System::MODULE_NAME, 1, 0, 0);
ASSERT_THAT(plugin->Initialize(service), Eq(""));
auto jsonRpc = plugin->QueryInterface<ILocalDispatcher>();
auto jsonRpc = plugin->QueryInterface<IDispatcher>();
ASSERT_THAT(jsonRpc, NotNull());
SetValueParamsData params;
params.Scope = WPEFramework::JsonData::PersistentStore::ScopeType::ACCOUNT;
Expand Down Expand Up @@ -223,7 +223,7 @@ TEST_F(APersistentStore, DeletesKeyInDeviceScopeViaJsonRpc)
};
PublishedServiceType<PersistentStoreImplementation> metadata(WPEFramework::Core::System::MODULE_NAME, 1, 0, 0);
ASSERT_THAT(plugin->Initialize(service), Eq(""));
auto jsonRpc = plugin->QueryInterface<ILocalDispatcher>();
auto jsonRpc = plugin->QueryInterface<IDispatcher>();
ASSERT_THAT(jsonRpc, NotNull());
DeleteKeyParamsInfo params;
params.Namespace = kAppId;
Expand Down Expand Up @@ -254,7 +254,7 @@ TEST_F(APersistentStore, DeletesKeyInAccountScopeViaJsonRpc)
};
PublishedServiceType<PersistentStoreImplementation> metadata(WPEFramework::Core::System::MODULE_NAME, 1, 0, 0);
ASSERT_THAT(plugin->Initialize(service), Eq(""));
auto jsonRpc = plugin->QueryInterface<ILocalDispatcher>();
auto jsonRpc = plugin->QueryInterface<IDispatcher>();
ASSERT_THAT(jsonRpc, NotNull());
DeleteKeyParamsInfo params;
params.Scope = WPEFramework::JsonData::PersistentStore::ScopeType::ACCOUNT;
Expand Down Expand Up @@ -285,7 +285,7 @@ TEST_F(APersistentStore, DeletesNamespaceInDeviceScopeViaJsonRpc)
};
PublishedServiceType<PersistentStoreImplementation> metadata(WPEFramework::Core::System::MODULE_NAME, 1, 0, 0);
ASSERT_THAT(plugin->Initialize(service), Eq(""));
auto jsonRpc = plugin->QueryInterface<ILocalDispatcher>();
auto jsonRpc = plugin->QueryInterface<IDispatcher>();
ASSERT_THAT(jsonRpc, NotNull());
DeleteNamespaceParamsInfo params;
params.Namespace = kAppId;
Expand Down Expand Up @@ -314,7 +314,7 @@ TEST_F(APersistentStore, DeletesNamespaceInAccountScopeViaJsonRpc)
};
PublishedServiceType<PersistentStoreImplementation> metadata(WPEFramework::Core::System::MODULE_NAME, 1, 0, 0);
ASSERT_THAT(plugin->Initialize(service), Eq(""));
auto jsonRpc = plugin->QueryInterface<ILocalDispatcher>();
auto jsonRpc = plugin->QueryInterface<IDispatcher>();
ASSERT_THAT(jsonRpc, NotNull());
DeleteNamespaceParamsInfo params;
params.Scope = WPEFramework::JsonData::PersistentStore::ScopeType::ACCOUNT;
Expand All @@ -339,7 +339,7 @@ TEST_F(APersistentStore, FlushesCacheViaJsonRpc)
};
PublishedServiceType<PersistentStoreImplementation> metadata(WPEFramework::Core::System::MODULE_NAME, 1, 0, 0);
ASSERT_THAT(plugin->Initialize(service), Eq(""));
auto jsonRpc = plugin->QueryInterface<ILocalDispatcher>();
auto jsonRpc = plugin->QueryInterface<IDispatcher>();
ASSERT_THAT(jsonRpc, NotNull());
string resultJsonStr;
EXPECT_THAT(jsonRpc->Invoke(0, 0, "", "flushCache", "", resultJsonStr), Eq(WPEFramework::Core::ERROR_NONE));
Expand All @@ -365,7 +365,7 @@ TEST_F(APersistentStore, GetsKeysInDeviceScopeViaJsonRpc)
};
PublishedServiceType<PersistentStoreImplementation> metadata(WPEFramework::Core::System::MODULE_NAME, 1, 0, 0);
ASSERT_THAT(plugin->Initialize(service), Eq(""));
auto jsonRpc = plugin->QueryInterface<ILocalDispatcher>();
auto jsonRpc = plugin->QueryInterface<IDispatcher>();
ASSERT_THAT(jsonRpc, NotNull());
DeleteNamespaceParamsInfo params;
params.Namespace = kAppId;
Expand Down Expand Up @@ -402,7 +402,7 @@ TEST_F(APersistentStore, GetsNamespacesInDeviceScopeViaJsonRpc)
};
PublishedServiceType<PersistentStoreImplementation> metadata(WPEFramework::Core::System::MODULE_NAME, 1, 0, 0);
ASSERT_THAT(plugin->Initialize(service), Eq(""));
auto jsonRpc = plugin->QueryInterface<ILocalDispatcher>();
auto jsonRpc = plugin->QueryInterface<IDispatcher>();
ASSERT_THAT(jsonRpc, NotNull());
string resultJsonStr;
ASSERT_THAT(jsonRpc->Invoke(0, 0, "", "getNamespaces", "", resultJsonStr), Eq(WPEFramework::Core::ERROR_NONE));
Expand Down Expand Up @@ -435,7 +435,7 @@ TEST_F(APersistentStore, GetsStorageSizesInDeviceScopeViaJsonRpc)
};
PublishedServiceType<PersistentStoreImplementation> metadata(WPEFramework::Core::System::MODULE_NAME, 1, 0, 0);
ASSERT_THAT(plugin->Initialize(service), Eq(""));
auto jsonRpc = plugin->QueryInterface<ILocalDispatcher>();
auto jsonRpc = plugin->QueryInterface<IDispatcher>();
ASSERT_THAT(jsonRpc, NotNull());
string resultJsonStr;
ASSERT_THAT(jsonRpc->Invoke(0, 0, "", "getStorageSizes", "", resultJsonStr), Eq(WPEFramework::Core::ERROR_NONE));
Expand Down Expand Up @@ -471,7 +471,7 @@ TEST_F(APersistentStore, GetsNamespaceStorageLimitInDeviceScopeViaJsonRpc)
};
PublishedServiceType<PersistentStoreImplementation> metadata(WPEFramework::Core::System::MODULE_NAME, 1, 0, 0);
ASSERT_THAT(plugin->Initialize(service), Eq(""));
auto jsonRpc = plugin->QueryInterface<ILocalDispatcher>();
auto jsonRpc = plugin->QueryInterface<IDispatcher>();
ASSERT_THAT(jsonRpc, NotNull());
DeleteNamespaceParamsInfo params;
params.Namespace = kAppId;
Expand Down Expand Up @@ -504,7 +504,7 @@ TEST_F(APersistentStore, SetsNamespaceStorageLimitInDeviceScopeViaJsonRpc)
};
PublishedServiceType<PersistentStoreImplementation> metadata(WPEFramework::Core::System::MODULE_NAME, 1, 0, 0);
ASSERT_THAT(plugin->Initialize(service), Eq(""));
auto jsonRpc = plugin->QueryInterface<ILocalDispatcher>();
auto jsonRpc = plugin->QueryInterface<IDispatcher>();
ASSERT_THAT(jsonRpc, NotNull());
SetNamespaceStorageLimitParamsData params;
params.Namespace = kAppId;
Expand Down
1 change: 0 additions & 1 deletion PersistentStore/l0test/ServiceMock.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ class ServiceMock : public WPEFramework::PluginHost::IShell,
MOCK_METHOD(void, DisableWebServer, (), (override));
MOCK_METHOD(WPEFramework::PluginHost::ISubSystem*, SubSystems, (), (override));
MOCK_METHOD(uint32_t, Submit, (const uint32_t, const WPEFramework::Core::ProxyType<WPEFramework::Core::JSON::IElement>&), (override));
MOCK_METHOD(void, Notify, (const string&), (override));
MOCK_METHOD(void, Notify, (const string&, const string&), (override));
MOCK_METHOD(void*, QueryInterfaceByCallsign, (const uint32_t, const string&), (override));
MOCK_METHOD(void, Register, (WPEFramework::PluginHost::IPlugin::INotification*), (override));
Expand Down
1 change: 0 additions & 1 deletion PersistentStore/l1test/ServiceMock.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ class ServiceMock : public WPEFramework::PluginHost::IShell,
MOCK_METHOD(void, DisableWebServer, (), (override));
MOCK_METHOD(WPEFramework::PluginHost::ISubSystem*, SubSystems, (), (override));
MOCK_METHOD(uint32_t, Submit, (const uint32_t, const WPEFramework::Core::ProxyType<WPEFramework::Core::JSON::IElement>&), (override));
MOCK_METHOD(void, Notify, (const string&), (override));
MOCK_METHOD(void, Notify, (const string&, const string&), (override));
MOCK_METHOD(void*, QueryInterfaceByCallsign, (const uint32_t, const string&), (override));
MOCK_METHOD(void, Register, (WPEFramework::PluginHost::IPlugin::INotification*), (override));
Expand Down

0 comments on commit c6b490c

Please sign in to comment.