aboutsummaryrefslogtreecommitdiff
path: root/brillo/namespaces/mock_platform.h
blob: 1b96b467806f30102d452559f56d3ed6f2867fb8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright 2020 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef LIBBRILLO_BRILLO_NAMESPACES_MOCK_PLATFORM_H_
#define LIBBRILLO_BRILLO_NAMESPACES_MOCK_PLATFORM_H_

#include "brillo/namespaces/platform.h"

#include <string>

#include <base/files/file_path.h>
#include <gmock/gmock.h>

namespace brillo {

class MockPlatform : public Platform {
 public:
  MockPlatform() {}
  virtual ~MockPlatform() {}

  MOCK_METHOD(bool, Unmount, (const base::FilePath&, bool, bool*), (override));
  MOCK_METHOD(pid_t, Fork, (), (override));
  MOCK_METHOD(pid_t, Waitpid, (pid_t, int*), (override));
  MOCK_METHOD(int,
              Mount,
              (const std::string&,
               const std::string&,
               const std::string&,
               uint64_t,
               const void*),
              (override));
};

}  // namespace brillo

#endif  // LIBBRILLO_BRILLO_NAMESPACES_MOCK_PLATFORM_H_