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 <string>
20 #include <unistd.h>
21
22 #include "core_service_client.h"
23 #include "esim_state_type.h"
24 #include "securec.h"
25 #include "str_convert.h"
26 #include "string_ex.h"
27 #include "telephony_errors.h"
28 #include "telephony_log_wrapper.h"
29 #include "gtest/gtest.h"
30
31 namespace OHOS {
32 namespace Telephony {
33 using namespace testing::ext;
34 class EsimCoreServiceClientTest : public testing::Test {
35 public:
36 static void SetUpTestCase();
37 static void TearDownTestCase();
38 void SetUp();
39 void TearDown();
40 };
41
SetUpTestCase()42 void EsimCoreServiceClientTest::SetUpTestCase() {}
43
TearDownTestCase()44 void EsimCoreServiceClientTest::TearDownTestCase() {}
45
SetUp()46 void EsimCoreServiceClientTest::SetUp() {}
47
TearDown()48 void EsimCoreServiceClientTest::TearDown() {}
49
50 HWTEST_F(EsimCoreServiceClientTest, SendApduData_0001, Function | MediumTest | Level1)
51 {
52 int32_t slotId = 0;
53 std::u16string aid = Str8ToStr16("aid test");
54 EsimApduData apduData;
55 ResponseEsimResult responseResult;
56 int32_t result = CoreServiceClient::GetInstance().SendApduData(slotId, aid, apduData, responseResult);
57 EXPECT_NE(result, TELEPHONY_SUCCESS);
58 }
59
60 } // namespace Telephony
61 } // namespace OHOS