Skip to content

Commit

Permalink
uncommenting
Browse files Browse the repository at this point in the history
  • Loading branch information
parvathika committed Dec 26, 2024
1 parent 6325655 commit e57242f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion LegacyPlugin_WiFiManagerAPIs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ namespace WPEFramework
Core::SystemInfo::SetEnvironment(_T("THUNDER_ACCESS"), (_T("127.0.0.1:9998")));
m_networkmanager = make_shared<WPEFramework::JSONRPC::SmartLinkType<WPEFramework::Core::JSON::IElement> >(_T(NETWORK_MANAGER_CALLSIGN), _T("org.rdk.Wifi"), query);

//subscribeToEvents();
subscribeToEvents();
return string();
}

Expand Down
15 changes: 13 additions & 2 deletions Tests/unit_test/test_LegacyPlugin_WiFiManagerAPIs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,25 @@ using namespace std;
using namespace WPEFramework;
using namespace WPEFramework::Plugin;
using ::testing::NiceMock;
using ::testing::Return;

class MockWiFiManager : public WiFiManager {
public:
MOCK_METHOD(void, subscribeToEvents, (), (override));
}

class WiFiManagerTest : public ::testing::Test {
protected:
Core::ProxyType<Plugin::WiFiManager> plugin;
// Core::ProxyType<Plugin::WiFiManager> plugin;
Core::ProxyType<MockWiFiManager> plugin;
Core::JSONRPC::Handler& handler;
DECL_CORE_JSONRPC_CONX connection;
Core::JSONRPC::Message message;
string response;
ServiceMock services;

WiFiManagerTest()
: plugin(Core::ProxyType<Plugin::WiFiManager>::Create())
: plugin(Core::ProxyType<MockWiFiManager>::Create()) //plugin(Core::ProxyType<Plugin::WiFiManager>::Create())
, handler(*(plugin))
, INIT_CONX(1, 0)
{
Expand All @@ -48,6 +55,10 @@ class WiFiManagerInitializedTest : public WiFiManagerTest {
EXPECT_EQ(name, string(_T("org.rdk.NetworkManager.1")));
return nullptr;
}));

EXPECT_CALL(*plugin, subscribeToEvents())
.Times(1)
.WillOnce(Return());
}

virtual ~WiFiManagerInitializedTest() override
Expand Down

0 comments on commit e57242f

Please sign in to comment.