1 #include "app.hpp" 2 #include "redfish.hpp" 3 4 #include <boost/asio/io_context.hpp> 5 6 #include <memory> 7 #include <string> 8 9 #include <gmock/gmock.h> 10 #include <gtest/gtest.h> 11 12 namespace redfish 13 { 14 namespace 15 { 16 using ::testing::EndsWith; 17 TEST(Redfish,PathsShouldValidate)18TEST(Redfish, PathsShouldValidate) 19 { 20 auto io = std::make_shared<boost::asio::io_context>(); 21 crow::App app(io); 22 23 RedfishService redfish(app); 24 25 app.validate(); 26 27 for (const std::string* route : app.getRoutes()) 28 { 29 ASSERT_NE(route, nullptr); 30 EXPECT_THAT(*route, EndsWith("/")); 31 } 32 } 33 34 } // namespace 35 } // namespace redfish 36