diff --git a/hueplusplus/Hue.cpp b/hueplusplus/Hue.cpp index 632e097..7684eb9 100755 --- a/hueplusplus/Hue.cpp +++ b/hueplusplus/Hue.cpp @@ -205,7 +205,7 @@ HueLight& Hue::getLight(int id) else if (type == "LST001" || type == "LLC006" || type == "LLC007" || type == "LLC010" || type == "LLC011" || type == "LLC012" || type == "LLC013") { // HueColorLight Gamut A - HueLight light = HueLight(ip, username, id, simpleBrightnessStrategy, simpleColorTemperatureStrategy, simpleColorHueStrategy, http_handler); + HueLight light = HueLight(ip, username, id, simpleBrightnessStrategy, nullptr, simpleColorHueStrategy, http_handler); light.colorType = ColorType::GAMUT_A; lights.emplace(id, light); return lights.find(id)->second; diff --git a/hueplusplus/test/test_HueLight.cpp b/hueplusplus/test/test_HueLight.cpp index d771e91..a0e3c7a 100755 --- a/hueplusplus/test/test_HueLight.cpp +++ b/hueplusplus/test/test_HueLight.cpp @@ -438,10 +438,10 @@ TEST_F(HueLightTest, hasTemperatureControl) HueLight test_light_3 = test_bridge.getLight(3); EXPECT_EQ(false, ctest_light_1.hasTemperatureControl()); - EXPECT_EQ(true, ctest_light_2.hasTemperatureControl()); + EXPECT_EQ(false, ctest_light_2.hasTemperatureControl()); EXPECT_EQ(true, ctest_light_3.hasTemperatureControl()); EXPECT_EQ(false, test_light_1.hasTemperatureControl()); - EXPECT_EQ(true, test_light_2.hasTemperatureControl()); + EXPECT_EQ(false, test_light_2.hasTemperatureControl()); EXPECT_EQ(true, test_light_3.hasTemperatureControl()); } @@ -512,9 +512,6 @@ TEST_F(HueLightTest, getBrightness) TEST_F(HueLightTest, setColorTemperature) { using namespace ::testing; - EXPECT_CALL(*handler, PUTJson("/api/" + bridge_username + "/lights/2/state", _, bridge_ip, 80)) - .Times(1) - .WillOnce(Return(Json::Value(Json::arrayValue))); Json::Value prep_ret; prep_ret = Json::Value(Json::arrayValue); prep_ret[2] = Json::Value(Json::objectValue); @@ -549,10 +546,10 @@ TEST_F(HueLightTest, getColorTemperature) HueLight test_light_3 = test_bridge.getLight(3); EXPECT_EQ(0, ctest_light_1.getColorTemperature()); - EXPECT_EQ(366, ctest_light_2.getColorTemperature()); + EXPECT_EQ(0, ctest_light_2.getColorTemperature()); EXPECT_EQ(366, ctest_light_3.getColorTemperature()); EXPECT_EQ(0, test_light_1.getColorTemperature()); - EXPECT_EQ(366, test_light_2.getColorTemperature()); + EXPECT_EQ(0, test_light_2.getColorTemperature()); EXPECT_EQ(366, test_light_3.getColorTemperature()); } @@ -775,9 +772,6 @@ TEST_F(HueLightTest, alert) TEST_F(HueLightTest, alertTemperature) { using namespace ::testing; - EXPECT_CALL(*handler, PUTJson("/api/" + bridge_username + "/lights/2/state", _, bridge_ip, 80)) - .Times(1) - .WillOnce(Return(Json::Value(Json::arrayValue))); EXPECT_CALL(*handler, PUTJson("/api/" + bridge_username + "/lights/3/state", _, bridge_ip, 80)) .Times(1) .WillOnce(Return(Json::Value(Json::arrayValue)));