1 // Copyright 2020 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 #ifndef LIBBRILLO_BRILLO_NAMESPACES_MOCK_PLATFORM_H_ 6 #define LIBBRILLO_BRILLO_NAMESPACES_MOCK_PLATFORM_H_ 7 8 #include "brillo/namespaces/platform.h" 9 10 #include <string> 11 12 #include <base/files/file_path.h> 13 #include <gmock/gmock.h> 14 15 namespace brillo { 16 17 class MockPlatform : public Platform { 18 public: MockPlatform()19 MockPlatform() {} ~MockPlatform()20 virtual ~MockPlatform() {} 21 22 MOCK_METHOD(bool, Unmount, (const base::FilePath&, bool, bool*), (override)); 23 MOCK_METHOD(pid_t, Fork, (), (override)); 24 MOCK_METHOD(pid_t, Waitpid, (pid_t, int*), (override)); 25 MOCK_METHOD(int, 26 Mount, 27 (const std::string&, 28 const std::string&, 29 const std::string&, 30 uint64_t, 31 const void*), 32 (override)); 33 }; 34 35 } // namespace brillo 36 37 #endif // LIBBRILLO_BRILLO_NAMESPACES_MOCK_PLATFORM_H_ 38