MCPcopy Create free account
hub / github.com/CalcProgrammer1/OpenRGB / TEST_F

Function TEST_F

dependencies/hueplusplus-1.0.0/test/test_Sensor.cpp:75–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75TEST_F(SensorTest, on)
76{
77 EXPECT_FALSE(getSensor().hasOn());
78 state["config"]["on"] = true;
79 EXPECT_TRUE(getSensor().hasOn());
80 EXPECT_TRUE(getSensor().isOn());
81
82 EXPECT_CALL(*handler,
83 PUTJson("/api/" + getBridgeUsername() + "/sensors/1/config", nlohmann::json({{"on", false}}), getBridgeIp(),
84 getBridgePort()))
85 .WillOnce(Return(nlohmann::json {{{"success", {{"/sensors/1/config/on", false}}}}}));
86 getSensor().setOn(false);
87}
88
89TEST_F(SensorTest, BatteryState)
90{

Callers

nothing calls this directly

Calls 15

getBridgeUsernameFunction · 0.85
getBridgeIpFunction · 0.85
getBridgePortFunction · 0.85
hasOnMethod · 0.80
hasAlertMethod · 0.80
hasReachableMethod · 0.80
hasUserTestMethod · 0.80
setUserTestMethod · 0.80
getPendingConfigMethod · 0.80
hasLEDIndicationMethod · 0.80
getLEDIndicationMethod · 0.80
setLEDIndicationMethod · 0.80

Tested by

no test coverage detected