| 28 | using hueplusplus::Action; |
| 29 | |
| 30 | TEST(Action, Constructor) |
| 31 | { |
| 32 | const std::string address = "/api/abcd/test"; |
| 33 | const nlohmann::json body = {{"test", "value"}}; |
| 34 | const nlohmann::json json = {{"address", address}, {"method", "PUT"}, {"body", body}}; |
| 35 | Action command(json); |
| 36 | |
| 37 | EXPECT_EQ(address, command.getAddress()); |
| 38 | EXPECT_EQ(Action::Method::put, command.getMethod()); |
| 39 | EXPECT_EQ(body, command.getBody()); |
| 40 | EXPECT_EQ(json, command.toJson()); |
| 41 | } |
| 42 | |
| 43 | TEST(Action, getMethod) |
| 44 | { |
nothing calls this directly
no test coverage detected