blob: 4cf7a92625a9b1331cda9407aaae80526f86d56b [file] [log] [blame]
Brad Ebinger3eb99bd2016-12-20 17:05:27 -08001/*
2 * Copyright (C) 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License
15 */
16
17package com.android.ims;
18
19import android.support.test.runner.AndroidJUnit4;
Brad Ebingered690772018-01-23 13:41:32 -080020import android.telephony.ims.aidl.IImsConfig;
Brad Ebinger3eb99bd2016-12-20 17:05:27 -080021
22import org.junit.After;
23import org.junit.Before;
24import org.junit.Test;
25import org.junit.runner.RunWith;
26import org.mockito.Mock;
27
28import static org.mockito.Matchers.eq;
29import static org.mockito.Mockito.verify;
30
31/**
32 * Unit Tests for ImsConfig
33 */
34@RunWith(AndroidJUnit4.class)
35public class ImsConfigTest extends ImsTestBase {
36
37 @Mock IImsConfig mMockImsConfigInterface;
38
39 ImsConfig mTestImsConfig;
40
41 @Before
42 @Override
43 public void setUp() throws Exception {
44 super.setUp();
45 mTestImsConfig = new ImsConfig(mMockImsConfigInterface, mContext);
46 }
47
48 @After
49 @Override
50 public void tearDown() throws Exception {
51 mTestImsConfig = null;
52 super.tearDown();
53 }
54
55 @Test
56 public void testImsConfigGetProvisionedValue() throws Exception {
57 int testItem = 0;
58
59 mTestImsConfig.getProvisionedValue(testItem);
60
Brad Ebingered690772018-01-23 13:41:32 -080061 verify(mMockImsConfigInterface).getConfigInt(eq(testItem));
Brad Ebinger3eb99bd2016-12-20 17:05:27 -080062 }
63}