Patrick Venture | d53d60a | 2020-04-07 09:01:34 -0700 | [diff] [blame] | 1 | #include "skip_action.hpp" |
| 2 | #include "status.hpp" |
| 3 | |
| 4 | #include <gmock/gmock.h> |
| 5 | #include <gtest/gtest.h> |
| 6 | |
| 7 | namespace ipmi_flash |
| 8 | { |
| 9 | namespace |
| 10 | { |
| 11 | |
| 12 | TEST(SkipActionTest, ValidateTriggerReturnsTrue) |
| 13 | { |
| 14 | SkipAction skip; |
| 15 | EXPECT_TRUE(skip.trigger()); |
| 16 | EXPECT_TRUE(skip.trigger()); |
| 17 | } |
| 18 | |
| 19 | TEST(SkipActionTest, ValidateStatusAlwaysSuccess) |
| 20 | { |
| 21 | SkipAction skip; |
| 22 | EXPECT_EQ(ActionStatus::success, skip.status()); |
| 23 | EXPECT_TRUE(skip.trigger()); |
| 24 | EXPECT_EQ(ActionStatus::success, skip.status()); |
| 25 | } |
| 26 | |
| 27 | TEST(SkipActionTest, AbortHasNoImpactOnStatus) |
| 28 | { |
| 29 | SkipAction skip; |
| 30 | EXPECT_EQ(ActionStatus::success, skip.status()); |
| 31 | skip.abort(); |
| 32 | EXPECT_EQ(ActionStatus::success, skip.status()); |
| 33 | } |
| 34 | |
| 35 | } // namespace |
| 36 | } // namespace ipmi_flash |