1 #include "version_handler.hpp" 2 #include "version_mock.hpp" 3 4 #include <array> 5 6 #include <gtest/gtest.h> 7 8 namespace ipmi_flash 9 { 10 11 TEST(VersionHandlerCanHandleTest, VerifyGoodInfoMap) 12 { 13 constexpr std::array blobNames{"blob0", "blob1", "blob2", "blob3"}; 14 VersionBlobHandler handler(createMockVersionConfigs(blobNames)); 15 for (const auto& blobName : blobNames) 16 { 17 EXPECT_TRUE(handler.canHandleBlob(blobName)); 18 } 19 } 20 21 TEST(VersionHandlerEnumerateTest, VerifyGoodInfoMap) 22 { 23 constexpr std::array blobNames{"blob0", "blob1", "blob2", "blob3"}; 24 VersionBlobHandler handler(createMockVersionConfigs(blobNames)); 25 EXPECT_THAT(handler.getBlobIds(), 26 ::testing::UnorderedElementsAreArray(blobNames)); 27 } 28 29 } // namespace ipmi_flash 30