1 #include "flags.hpp" 2 #include "image_mock.hpp" 3 #include "triggerable_mock.hpp" 4 #include "util.hpp" 5 #include "version_handler.hpp" 6 7 #include <array> 8 #include <string> 9 #include <vector> 10 11 #include <gtest/gtest.h> 12 13 namespace ipmi_flash 14 { 15 16 TEST(VersionHandlerCanHandleTest, VerifyGoodInfoMapPasses) 17 { 18 VersionInfoMap test; 19 std::array blobNames{"blob0", "blob1", "blob2", "blob3"}; 20 for (const auto& blobName : blobNames) 21 { 22 test.try_emplace(blobName, 23 VersionInfoPack(blobName, 24 std::make_unique<VersionActionPack>( 25 CreateTriggerMock()), 26 CreateImageMock())); 27 } 28 auto handler = VersionBlobHandler::create(std::move(test)); 29 EXPECT_NE(handler, nullptr); 30 } 31 32 } // namespace ipmi_flash 33