Flutter Engine
 
Loading...
Searching...
No Matches
jni_mock_unittest.cc
Go to the documentation of this file.
1// Copyright 2013 The Flutter 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
6
7#include "gmock/gmock.h"
8#include "gtest/gtest.h"
9
10namespace flutter {
11namespace testing {
12
13TEST(JNIMock, FlutterViewHandlePlatformMessage) {
15
16 auto message = std::make_unique<PlatformMessage>("<channel-name>", nullptr);
17 auto response_id = 1;
18
19 EXPECT_CALL(mock,
20 FlutterViewHandlePlatformMessage(
21 ::testing::Property(&std::unique_ptr<PlatformMessage>::get,
22 message.get()),
23 response_id));
24
25 mock.FlutterViewHandlePlatformMessage(std::move(message), response_id);
26}
27
28} // namespace testing
29} // namespace flutter
G_BEGIN_DECLS GBytes * message
static MockEpoxy * mock
Definition mock_epoxy.cc:53
TEST(NativeAssetsManagerTest, NoAvailableAssets)