1 /* 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #include <gtest/gtest.h> 17 18 #include "mmi_client.h" 19 20 namespace OHOS { 21 namespace MMI { 22 namespace { 23 using namespace testing::ext; 24 } // namespace 25 26 class MMIClientTest : public testing::Test { 27 public: SetUpTestCase(void)28 static void SetUpTestCase(void) {} TearDownTestCase(void)29 static void TearDownTestCase(void) {} 30 }; 31 32 ConnectCallback connectFun; 33 34 /** 35 * @tc.name: RegisterConnectedFunction 36 * @tc.desc: Verify register connected 37 * @tc.type: FUNC 38 * @tc.require: 39 */ 40 HWTEST_F(MMIClientTest, RegisterConnectedFunction, TestSize.Level1) 41 { 42 MMIClient mmiClient; 43 ASSERT_NO_FATAL_FAILURE(mmiClient.RegisterConnectedFunction(connectFun)); 44 } 45 46 /** 47 * @tc.name: RegisterDisconnectedFunction 48 * @tc.desc: Verify register disconnected 49 * @tc.type: FUNC 50 * @tc.require: 51 */ 52 HWTEST_F(MMIClientTest, RegisterDisconnectedFunction, TestSize.Level1) 53 { 54 MMIClient mmiClient; 55 ASSERT_NO_FATAL_FAILURE(mmiClient.RegisterDisconnectedFunction(connectFun)); 56 } 57 } 58 } // namespace MMI 59