xref: /aosp_15_r20/external/libbrillo/brillo/namespaces/mock_platform.h (revision 1a96fba65179ea7d3f56207137718607415c5953)
1*1a96fba6SXin Li // Copyright 2020 The Chromium OS Authors. All rights reserved.
2*1a96fba6SXin Li // Use of this source code is governed by a BSD-style license that can be
3*1a96fba6SXin Li // found in the LICENSE file.
4*1a96fba6SXin Li 
5*1a96fba6SXin Li #ifndef LIBBRILLO_BRILLO_NAMESPACES_MOCK_PLATFORM_H_
6*1a96fba6SXin Li #define LIBBRILLO_BRILLO_NAMESPACES_MOCK_PLATFORM_H_
7*1a96fba6SXin Li 
8*1a96fba6SXin Li #include "brillo/namespaces/platform.h"
9*1a96fba6SXin Li 
10*1a96fba6SXin Li #include <string>
11*1a96fba6SXin Li 
12*1a96fba6SXin Li #include <base/files/file_path.h>
13*1a96fba6SXin Li #include <gmock/gmock.h>
14*1a96fba6SXin Li 
15*1a96fba6SXin Li namespace brillo {
16*1a96fba6SXin Li 
17*1a96fba6SXin Li class MockPlatform : public Platform {
18*1a96fba6SXin Li  public:
MockPlatform()19*1a96fba6SXin Li   MockPlatform() {}
~MockPlatform()20*1a96fba6SXin Li   virtual ~MockPlatform() {}
21*1a96fba6SXin Li 
22*1a96fba6SXin Li   MOCK_METHOD(bool, Unmount, (const base::FilePath&, bool, bool*), (override));
23*1a96fba6SXin Li   MOCK_METHOD(pid_t, Fork, (), (override));
24*1a96fba6SXin Li   MOCK_METHOD(pid_t, Waitpid, (pid_t, int*), (override));
25*1a96fba6SXin Li   MOCK_METHOD(int,
26*1a96fba6SXin Li               Mount,
27*1a96fba6SXin Li               (const std::string&,
28*1a96fba6SXin Li                const std::string&,
29*1a96fba6SXin Li                const std::string&,
30*1a96fba6SXin Li                uint64_t,
31*1a96fba6SXin Li                const void*),
32*1a96fba6SXin Li               (override));
33*1a96fba6SXin Li };
34*1a96fba6SXin Li 
35*1a96fba6SXin Li }  // namespace brillo
36*1a96fba6SXin Li 
37*1a96fba6SXin Li #endif  // LIBBRILLO_BRILLO_NAMESPACES_MOCK_PLATFORM_H_
38