1 /*
2  * Copyright (C) 2024 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 #define private public
17 #define protected public
18 
19 #include <gtest/gtest.h>
20 #include "sim_account_callback_proxy.h"
21 
22 namespace OHOS {
23 namespace Telephony {
24 using namespace testing::ext;
25 
26 class SimAccountCallbackProxyTest : public testing::Test {
27 public:
28     SimAccountCallbackProxyTest() = default;
29     ~SimAccountCallbackProxyTest() = default;
30 };
31 
HWTEST_F(SimAccountCallbackProxyTest, SimAccountCallbackProxy_01, Function | MediumTest | Level1)32 HWTEST_F(SimAccountCallbackProxyTest, SimAccountCallbackProxy_01, Function | MediumTest | Level1)
33 {
34     std::u16string des = SimAccountCallbackProxy::GetDescriptor();
35     std::cout << "SimAccountCallbackProxy_01 Descriptor " << des.c_str() << std::endl;
36     SimAccountCallbackProxy *proxy = new SimAccountCallbackProxy(nullptr);
37     proxy->OnSimAccountChanged();
38     ASSERT_FALSE(des.length() == 0);
39 }
40 
41 } // namespace Telephony
42 } // namespace OHOS