blob: 7a5f6dd56d52e7cd5a328e8e44ebd5fec278ef16 [file] [log] [blame]
#include "internal_sys_mock.hpp"
#include <ipmiblob/ipmi_errors.hpp>
#include <ipmiblob/ipmi_handler.hpp>
namespace ipmiblob
{
using ::testing::_;
using ::testing::Return;
TEST(IpmiHandlerTest, OpenAllFails)
{
/* Open against all device files fail. */
internal::InternalSysMock sysMock;
IpmiHandler ipmi(&sysMock);
EXPECT_CALL(sysMock, open(_, _)).WillRepeatedly(Return(-1));
EXPECT_THROW(ipmi.open(), IpmiException);
}
} // namespace ipmiblob