#include "async_resp.hpp" #include "thermal_subsystem.hpp" #include #include #include #include namespace redfish { namespace { constexpr const char* chassisId = "ChassisId"; constexpr const char* validChassisPath = "ChassisPath"; void assertThermalCollectionGet(crow::Response& res) { nlohmann::json& json = res.jsonValue; EXPECT_EQ(json["@odata.type"], "#ThermalSubsystem.v1_0_0.ThermalSubsystem"); EXPECT_EQ(json["Name"], "Thermal Subsystem"); EXPECT_EQ(json["Id"], "ThermalSubsystem"); EXPECT_EQ(json["@odata.id"], "/redfish/v1/Chassis/ChassisId/ThermalSubsystem"); EXPECT_EQ(json["Status"]["State"], "Enabled"); EXPECT_EQ(json["Status"]["Health"], "OK"); } TEST(ThermalSubsystemCollectionTest, ThermalSubsystemCollectionStaticAttributesAreExpected) { auto shareAsyncResp = std::make_shared(); shareAsyncResp->res.setCompleteRequestHandler(assertThermalCollectionGet); doThermalSubsystemCollection( shareAsyncResp, chassisId, std::make_optional(validChassisPath)); } } // namespace } // namespace redfish