mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
ec92c85a15
Summary: Changelog: [ios][added] - introduce MockSurfaceHandler following the recommendation in https://fb.workplace.com/groups/474291069286180/posts/6540719469309946 in order to unit test classes that use SurfaceHandler, we need to be able to mock it somehow - since the class is final we aren't able to do that. in this diff, we add the mock class. Reviewed By: sammy-SC Differential Revision: D30578927 fbshipit-source-id: 9b39b03ad0b55cecd9b482f9cce9630d7e7d5bda
26 lines
570 B
C++
26 lines
570 B
C++
/*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <gmock/gmock.h>
|
|
|
|
#include <react/renderer/scheduler/SurfaceHandler.h>
|
|
|
|
namespace facebook {
|
|
namespace react {
|
|
|
|
class MockSurfaceHandler : public SurfaceHandler {
|
|
public:
|
|
MockSurfaceHandler() : SurfaceHandler("moduleName", 0){};
|
|
|
|
MOCK_QUALIFIED_METHOD1(setDisplayMode, const noexcept, void(DisplayMode));
|
|
};
|
|
|
|
} // namespace react
|
|
} // namespace facebook
|