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 using namespace OHOS::MMI; 25 } // namespace 26 27 class MMIClientTest : public testing::Test { 28 public: SetUpTestCase(void)29 static void SetUpTestCase(void) {} TearDownTestCase(void)30 static void TearDownTestCase(void) {} 31 }; 32 33 ConnectCallback connectFun; 34 35 /** 36 * @tc.name:RegisterConnectedFunction 37 * @tc.desc:Verify register connected 38 * @tc.type: FUNC 39 * @tc.require: 40 */ 41 HWTEST_F(MMIClientTest, RegisterConnectedFunction, TestSize.Level1) 42 { 43 MMIClient mmiClient; 44 mmiClient.RegisterConnectedFunction(connectFun); 45 } 46 47 /** 48 * @tc.name:RegisterDisconnectedFunction 49 * @tc.desc:Verify register disconnected 50 * @tc.type: FUNC 51 * @tc.require: 52 */ 53 HWTEST_F(MMIClientTest, RegisterDisconnectedFunction, TestSize.Level1) 54 { 55 MMIClient mmiClient; 56 mmiClient.RegisterDisconnectedFunction(connectFun); 57 } 58 } // namespace MMI 59 } // namespace OHOS