blob: b8eccf068e069f3243572bd842d77876f0aae11f [file] [log] [blame]
Mike Frysinger1dad0972019-02-23 18:36:37 -05001// Copyright 2019 The Chromium OS Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "dev-install/dev_install.h"
6
7#include <gmock/gmock.h>
8#include <gtest/gtest.h>
9
10using ::testing::_;
11using ::testing::Return;
12
13namespace dev_install {
14
15namespace {
16
17class DevInstallMock : public DevInstall {
18 public:
19 MOCK_METHOD1(Exec, int(const std::vector<const char*>&));
20};
21
22class DevInstallTest : public ::testing::Test {
23 protected:
24 DevInstallMock dev_install_;
25};
26
27} // namespace
28
29// Check default run through.
30TEST_F(DevInstallTest, Run) {
31 EXPECT_CALL(dev_install_, Exec(_)).WillOnce(Return(1234));
32 EXPECT_EQ(1234, dev_install_.Run());
33}
34
35} // namespace dev_install