115b6f9f9SEd Tanous #include "app.hpp" 215b6f9f9SEd Tanous #include "redfish.hpp" 315b6f9f9SEd Tanous 415b6f9f9SEd Tanous #include <boost/asio/io_context.hpp> 515b6f9f9SEd Tanous 615b6f9f9SEd Tanous #include <memory> 7*e9f12014SEd Tanous #include <string> 815b6f9f9SEd Tanous 9*e9f12014SEd Tanous #include <gmock/gmock.h> 1015b6f9f9SEd Tanous #include <gtest/gtest.h> 1115b6f9f9SEd Tanous 1215b6f9f9SEd Tanous namespace redfish 1315b6f9f9SEd Tanous { 1415b6f9f9SEd Tanous namespace 1515b6f9f9SEd Tanous { 16*e9f12014SEd Tanous using ::testing::EndsWith; 1715b6f9f9SEd Tanous TEST(Redfish,PathsShouldValidate)1815b6f9f9SEd TanousTEST(Redfish, PathsShouldValidate) 1915b6f9f9SEd Tanous { 2015b6f9f9SEd Tanous auto io = std::make_shared<boost::asio::io_context>(); 2115b6f9f9SEd Tanous crow::App app(io); 2215b6f9f9SEd Tanous 2315b6f9f9SEd Tanous RedfishService redfish(app); 2415b6f9f9SEd Tanous 2515b6f9f9SEd Tanous app.validate(); 26*e9f12014SEd Tanous 27*e9f12014SEd Tanous for (const std::string* route : app.getRoutes()) 28*e9f12014SEd Tanous { 29*e9f12014SEd Tanous ASSERT_NE(route, nullptr); 30*e9f12014SEd Tanous EXPECT_THAT(*route, EndsWith("/")); 31*e9f12014SEd Tanous } 3215b6f9f9SEd Tanous } 3315b6f9f9SEd Tanous 3415b6f9f9SEd Tanous } // namespace 3515b6f9f9SEd Tanous } // namespace redfish 36