• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2025 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
16import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect, Level } from '@ohos/hypium';
17import { camera } from '@kit.CameraKit';
18import { common } from '@kit.AbilityKit';
19import { cameraErrorCode, cameraPosition, cameraType, driveFn, getPermission, isEmpty } from '../common';
20
21const TAG = "CameraXts.createCameraInputTest";
22const abnormalValue = -1;
23let mCameraManager: camera.CameraManager;
24let mCameraDeviceArray: Array<camera.CameraDevice>;
25let testContext: common.UIAbilityContext = AppStorage.get('testContext') as common.UIAbilityContext;
26
27function getCameraManager() {
28  console.info(TAG, 'getCameraManager.');
29  mCameraManager = camera.getCameraManager(testContext);
30  if (isEmpty(mCameraManager)) {
31    return false;
32  }
33  return true;
34}
35
36function getSupportedCameraDeviceArray() {
37  console.info(TAG, 'getSupportedCameraDeviceArray.');
38  mCameraDeviceArray = mCameraManager.getSupportedCameras();
39  if (isEmpty(mCameraDeviceArray)) {
40    return false;
41  }
42  console.info(TAG, 'getSupportedCameraDeviceArray length: ' + mCameraDeviceArray.length);
43  return true;
44}
45
46function getInputWithOneParamTest(done: Function, testName: string, device: camera.CameraDevice | undefined | null) {
47  console.info(TAG, testName + ' begin.');
48  try {
49    if (isEmpty(mCameraManager)) {
50      console.info(TAG, testName + ' cameraManager is null.');
51      expect().assertFail();
52    } else {
53      mCameraManager.createCameraInput(device);
54    }
55    done();
56  } catch (error) {
57    console.error(TAG, testName + ' failed. err: ' + error.code + ', msg: ' + error.message);
58    expect(error.code == cameraErrorCode.INVALID_ARGUMENT).assertTrue();
59    done();
60  }
61}
62
63function getInputWithTwoParamsTest(done: Function, testName: string, position: camera.CameraPosition | undefined | null,
64  type: camera.CameraType | undefined | null) {
65  console.info(TAG, testName + ' begin.');
66  try {
67    if (isEmpty(mCameraManager)) {
68      console.info(TAG, testName + ' cameraManager is null.');
69      expect().assertFail();
70    } else {
71      mCameraManager.createCameraInput(position as camera.CameraPosition, type as camera.CameraType);
72    }
73    done();
74  } catch (error) {
75    console.error(TAG, testName + ' failed. err: ' + error.code + ', msg: ' + error.message);
76    expect(error.code == cameraErrorCode.INVALID_ARGUMENT || error.code == cameraErrorCode.SERVICE_FATAL_ERROR)
77      .assertTrue();
78    done();
79  }
80}
81
82export default function createCameraInputTest() {
83  describe('createCameraInputTest', () => {
84    beforeAll(async () => {
85      console.info(TAG, 'beforeAll case.');
86      getCameraManager();
87      getSupportedCameraDeviceArray();
88      await getPermission();
89      await driveFn();
90    });
91
92    beforeEach(() => {
93      console.info(TAG, 'beforeEach case.');
94    });
95
96    afterEach(() => {
97      console.info(TAG, 'afterEach case.');
98    });
99
100    afterAll(() => {
101      console.info(TAG, 'afterAll case.');
102    });
103
104    /**
105     * @tc.number    : CAMERA_MANAGER_CREATE_CAMERA_INPUT_001
106     * @tc.name      : createCameraInput_001
107     * @tc.desc      : No abnormal scenarios - 1 param -> pass
108     * @tc.size      : MEDIUM
109     * @tc.type      : Function
110     * @tc.level     : Level 0
111     */
112    it('createCameraInput_001', Level.LEVEL1, async (done: Function) => {
113      const testName = 'createCameraInput_001';
114      console.info(TAG, testName + ' begin.');
115      try {
116        if (isEmpty(mCameraManager) && isEmpty(mCameraDeviceArray)) {
117          console.info(TAG, testName + ' cameraManager is null.');
118          expect().assertFail();
119        } else {
120          for (let i = 0; i < mCameraDeviceArray.length; i++) {
121            let cameraInput = mCameraManager.createCameraInput(mCameraDeviceArray[i]);
122            expect(isEmpty(cameraInput)).assertFalse();
123            console.info(TAG, testName + ' i: ' + i + ', cameraInput: ' + cameraInput);
124          }
125        }
126        done();
127      } catch (error) {
128        console.error(TAG, testName + ' failed. err: ' + error.code + ', msg: ' + error.message);
129        expect().assertFail();
130        done();
131      }
132    })
133
134    /**
135     * @tc.number    : CAMERA_MANAGER_CREATE_CAMERA_INPUT_002
136     * @tc.name      : createCameraInput_002
137     * @tc.desc      : No abnormal scenarios - 2 params -> pass
138     * @tc.size      : MEDIUM
139     * @tc.type      : Function
140     * @tc.level     : Level 0
141     */
142    it('createCameraInput_002', Level.LEVEL1, async (done: Function) => {
143      const testName = 'createCameraInput_002';
144      console.info(TAG, testName + ' begin.');
145      try {
146        if (isEmpty(mCameraManager) && isEmpty(mCameraDeviceArray)) {
147          console.info(TAG, testName + ' cameraManager is null.');
148          expect().assertFail();
149        } else {
150          for (let i = 0; i < mCameraDeviceArray.length; i++) {
151            let cameraInput =
152              mCameraManager.createCameraInput(mCameraDeviceArray[i].cameraPosition, mCameraDeviceArray[i].cameraType);
153            expect(isEmpty(cameraInput)).assertFalse();
154            console.info(TAG, testName + ' i: ' + i + ', cameraInput: ' + cameraInput);
155          }
156        }
157        done();
158      } catch (error) {
159        console.error(TAG, testName + ' failed. err: ' + error.code + ', msg: ' + error.message);
160        expect().assertFail();
161        done();
162      }
163    })
164
165    /**
166     * @tc.number    : CAMERA_MANAGER_CREATE_CAMERA_INPUT_003
167     * @tc.name      : createCameraInput_abnormal_001
168     * @tc.desc      : camaraDevice->invalid -> error_code: 7400101
169     * @tc.size      : MEDIUM
170     * @tc.type      : Function
171     * @tc.level     : Level 0
172     */
173    it('createCameraInput_abnormal_001', Level.LEVEL1, async (done: Function) => {
174      const testName = 'createCameraInput_abnormal_001';
175      let cameraDevice: camera.CameraDevice = mCameraDeviceArray[abnormalValue];
176      getInputWithOneParamTest(done, testName, cameraDevice);
177    })
178
179    /**
180     * @tc.number    : CAMERA_MANAGER_CREATE_CAMERA_INPUT_004
181     * @tc.name      : createCameraInput_abnormal_002
182     * @tc.desc      : camaraDevice->undefined -> error_code: 7400101
183     * @tc.size      : MEDIUM
184     * @tc.type      : Function
185     * @tc.level     : Level 2
186     */
187    it('createCameraInput_abnormal_002', Level.LEVEL2, async (done: Function) => {
188      const testName = 'createCameraInput_abnormal_002';
189      let cameraDevice: camera.CameraDevice | undefined = undefined;
190      getInputWithOneParamTest(done, testName, cameraDevice);
191    })
192
193    /**
194     * @tc.number    : CAMERA_MANAGER_CREATE_CAMERA_INPUT_005
195     * @tc.name      : createCameraInput_abnormal_003
196     * @tc.desc      : camaraDevice->null -> error_code: 7400101
197     * @tc.size      : MEDIUM
198     * @tc.type      : Function
199     * @tc.level     : Level 2
200     */
201    it('createCameraInput_abnormal_003', Level.LEVEL2, async (done: Function) => {
202      const testName = 'createCameraInput_abnormal_003';
203      let cameraDevice: camera.CameraDevice | null = null;
204      getInputWithOneParamTest(done, testName, cameraDevice);
205    })
206
207    /**
208     * @tc.number    : CAMERA_MANAGER_CREATE_CAMERA_INPUT_006
209     * @tc.name      : createCameraInput_two_params_abnormal_001
210     * @tc.desc      : cameraPosition->invalid, normal cameraType -> error_code: 7400201
211     * @tc.size      : MEDIUM
212     * @tc.type      : Function
213     * @tc.level     : Level 2
214     */
215    it('createCameraInput_two_params_abnormal_001', Level.LEVEL2, async (done: Function) => {
216      const testName = 'createCameraInput_two_params_abnormal_001';
217      let position: camera.CameraPosition = abnormalValue;
218      let type: camera.CameraType = mCameraDeviceArray[0].cameraType;
219      getInputWithTwoParamsTest(done, testName, position, type);
220    })
221
222    /**
223     * @tc.number    : CAMERA_MANAGER_CREATE_CAMERA_INPUT_007
224     * @tc.name      : createCameraInput_two_params_abnormal_002
225     * @tc.desc      : cameraPosition->null, normal cameraType -> error_code: 7400101
226     * @tc.size      : MEDIUM
227     * @tc.type      : Function
228     * @tc.level     : Level 2
229     */
230    it('createCameraInput_two_params_abnormal_002', Level.LEVEL2, async (done: Function) => {
231      const testName = 'createCameraInput_two_params_abnormal_002';
232      let position: camera.CameraPosition | null = null;
233      let type: camera.CameraType = mCameraDeviceArray[0].cameraType;
234      getInputWithTwoParamsTest(done, testName, position, type);
235    })
236
237    /**
238     * @tc.number    : CAMERA_MANAGER_CREATE_CAMERA_INPUT_008
239     * @tc.name      : createCameraInput_two_params_abnormal_003
240     * @tc.desc      : cameraPosition->undefined, normal cameraType -> error_code: 7400101
241     * @tc.size      : MEDIUM
242     * @tc.type      : Function
243     * @tc.level     : Level 2
244     */
245    it('createCameraInput_two_params_abnormal_003', Level.LEVEL2, async (done: Function) => {
246      const testName = 'createCameraInput_two_params_abnormal_003';
247      let position: camera.CameraPosition | undefined = undefined;
248      let type: camera.CameraType = mCameraDeviceArray[0].cameraType;
249      getInputWithTwoParamsTest(done, testName, position, type);
250    })
251
252    /**
253     * @tc.number    : CAMERA_MANAGER_CREATE_CAMERA_INPUT_009
254     * @tc.name      : createCameraInput_two_params_abnormal_004
255     * @tc.desc      : normal cameraPosition, cameraType->invalid -> error_code: 7400201
256     * @tc.size      : MEDIUM
257     * @tc.type      : Function
258     * @tc.level     : Level 2
259     */
260    it('createCameraInput_two_params_abnormal_004', Level.LEVEL2, async (done: Function) => {
261      const testName = 'createCameraInput_two_params_abnormal_004';
262      let position: camera.CameraPosition = mCameraDeviceArray[0].cameraPosition;
263      let type: camera.CameraType = abnormalValue;
264      getInputWithTwoParamsTest(done, testName, position, type);
265    })
266
267    /**
268     * @tc.number    : CAMERA_MANAGER_CREATE_CAMERA_INPUT_010
269     * @tc.name      : createCameraInput_two_params_abnormal_005
270     * @tc.desc      : normal cameraPosition, cameraType->null -> error_code: 7400101
271     * @tc.size      : MEDIUM
272     * @tc.type      : Function
273     * @tc.level     : Level 2
274     */
275    it('createCameraInput_two_params_abnormal_005', Level.LEVEL2, async (done: Function) => {
276      const testName = 'createCameraInput_two_params_abnormal_005';
277      let position: camera.CameraPosition = mCameraDeviceArray[0].cameraPosition;
278      let type: camera.CameraType | null = null;
279      getInputWithTwoParamsTest(done, testName, position, type);
280    })
281
282    /**
283     * @tc.number    : CAMERA_MANAGER_CREATE_CAMERA_INPUT_011
284     * @tc.name      : createCameraInput_two_params_abnormal_006
285     * @tc.desc      : normal cameraPosition, cameraType->undefined -> error_code: 7400101
286     * @tc.size      : MEDIUM
287     * @tc.type      : Function
288     * @tc.level     : Level 2
289     */
290    it('createCameraInput_two_params_abnormal_006', Level.LEVEL2, async (done: Function) => {
291      const testName = 'createCameraInput_two_params_abnormal_006';
292      let position: camera.CameraPosition = mCameraDeviceArray[0].cameraPosition;
293      let type: camera.CameraType | undefined = undefined;
294      getInputWithTwoParamsTest(done, testName, position, type);
295    })
296
297    /**
298     * @tc.number    : CAMERA_MANAGER_CREATE_CAMERA_INPUT_012
299     * @tc.name      : createCameraInput_two_params_001
300     * @tc.desc      : cameraPosition->CAMERA_POSITION_UNSPECIFIED, cameraType->CAMERA_TYPE_DEFAULT -> error_code: 7400201
301     * @tc.size      : MEDIUM
302     * @tc.type      : Function
303     * @tc.level     : Level 2
304     */
305    it('createCameraInput_two_params_001', Level.LEVEL2, async (done: Function) => {
306      const testName = 'createCameraInput_two_params_001';
307      let position: camera.CameraPosition = cameraPosition.CAMERA_POSITION_UNSPECIFIED;
308      let type: camera.CameraType = cameraType.CAMERA_TYPE_DEFAULT;
309      getInputWithTwoParamsTest(done, testName, position, type);
310    })
311
312    /**
313     * @tc.number    : CAMERA_MANAGER_CREATE_CAMERA_INPUT_013
314     * @tc.name      : createCameraInput_two_params_002
315     * @tc.desc      : cameraPosition->CAMERA_POSITION_UNSPECIFIED, cameraType->CAMERA_TYPE_WIDE_ANGLE -> error_code: 7400201
316     * @tc.size      : MEDIUM
317     * @tc.type      : Function
318     * @tc.level     : Level 2
319     */
320    it('createCameraInput_two_params_002', Level.LEVEL2, async (done: Function) => {
321      const testName = 'createCameraInput_two_params_002';
322      let position: camera.CameraPosition = cameraPosition.CAMERA_POSITION_UNSPECIFIED;
323      let type: camera.CameraType = cameraType.CAMERA_TYPE_WIDE_ANGLE;
324      getInputWithTwoParamsTest(done, testName, position, type);
325    })
326
327    /**
328     * @tc.number    : CAMERA_MANAGER_CREATE_CAMERA_INPUT_014
329     * @tc.name      : createCameraInput_two_params_003
330     * @tc.desc      : cameraPosition->CAMERA_POSITION_UNSPECIFIED, cameraType->CAMERA_TYPE_ULTRA_WIDE -> error_code: 7400201
331     * @tc.size      : MEDIUM
332     * @tc.type      : Function
333     * @tc.level     : Level 2
334     */
335    it('createCameraInput_two_params_003', Level.LEVEL2, async (done: Function) => {
336      const testName = 'createCameraInput_two_params_003';
337      let position: camera.CameraPosition = cameraPosition.CAMERA_POSITION_UNSPECIFIED;
338      let type: camera.CameraType = cameraType.CAMERA_TYPE_ULTRA_WIDE;
339      getInputWithTwoParamsTest(done, testName, position, type);
340    })
341
342    /**
343     * @tc.number    : CAMERA_MANAGER_CREATE_CAMERA_INPUT_015
344     * @tc.name      : createCameraInput_two_params_004
345     * @tc.desc      : cameraPosition->CAMERA_POSITION_UNSPECIFIED, cameraType->CAMERA_TYPE_TELEPHOTO -> error_code: 7400201
346     * @tc.size      : MEDIUM
347     * @tc.type      : Function
348     * @tc.level     : Level 2
349     */
350    it('createCameraInput_two_params_004', Level.LEVEL2, async (done: Function) => {
351      const testName = 'createCameraInput_two_params_004';
352      let position: camera.CameraPosition = cameraPosition.CAMERA_POSITION_UNSPECIFIED;
353      let type: camera.CameraType = cameraType.CAMERA_TYPE_TELEPHOTO;
354      getInputWithTwoParamsTest(done, testName, position, type);
355    })
356
357    /**
358     * @tc.number    : CAMERA_MANAGER_CREATE_CAMERA_INPUT_016
359     * @tc.name      : createCameraInput_two_params_005
360     * @tc.desc      : cameraPosition->CAMERA_POSITION_UNSPECIFIED, cameraType->CAMERA_TYPE_TRUE_DEPTH -> error_code: 7400201
361     * @tc.size      : MEDIUM
362     * @tc.type      : Function
363     * @tc.level     : Level 2
364     */
365    it('createCameraInput_two_params_005', Level.LEVEL2, async (done: Function) => {
366      const testName = 'createCameraInput_two_params_005';
367      let position: camera.CameraPosition = cameraPosition.CAMERA_POSITION_UNSPECIFIED;
368      let type: camera.CameraType = cameraType.CAMERA_TYPE_TRUE_DEPTH;
369      getInputWithTwoParamsTest(done, testName, position, type);
370    })
371
372    /**
373     * @tc.number    : CAMERA_MANAGER_CREATE_CAMERA_INPUT_017
374     * @tc.name      : createCameraInput_two_params_006
375     * @tc.desc      : cameraPosition->CAMERA_POSITION_BACK, cameraType->CAMERA_TYPE_DEFAULT -> error_code: 7400201
376     * @tc.size      : MEDIUM
377     * @tc.type      : Function
378     * @tc.level     : Level 2
379     */
380    it('createCameraInput_two_params_006', Level.LEVEL2, async (done: Function) => {
381      const testName = 'createCameraInput_two_params_006';
382      let position: camera.CameraPosition = cameraPosition.CAMERA_POSITION_BACK;
383      let type: camera.CameraType = cameraType.CAMERA_TYPE_DEFAULT;
384      getInputWithTwoParamsTest(done, testName, position, type);
385    })
386
387    /**
388     * @tc.number    : CAMERA_MANAGER_CREATE_CAMERA_INPUT_018
389     * @tc.name      : createCameraInput_two_params_007
390     * @tc.desc      : cameraPosition->CAMERA_POSITION_BACK, cameraType->CAMERA_TYPE_WIDE_ANGLE -> error_code: 7400201
391     * @tc.size      : MEDIUM
392     * @tc.type      : Function
393     * @tc.level     : Level 2
394     */
395    it('createCameraInput_two_params_007', Level.LEVEL2, async (done: Function) => {
396      const testName = 'createCameraInput_two_params_007';
397      let position: camera.CameraPosition = cameraPosition.CAMERA_POSITION_BACK;
398      let type: camera.CameraType = cameraType.CAMERA_TYPE_WIDE_ANGLE;
399      getInputWithTwoParamsTest(done, testName, position, type);
400    })
401
402    /**
403     * @tc.number    : CAMERA_MANAGER_CREATE_CAMERA_INPUT_019
404     * @tc.name      : createCameraInput_two_params_008
405     * @tc.desc      : cameraPosition->CAMERA_POSITION_BACK, cameraType->CAMERA_TYPE_ULTRA_WIDE -> error_code: 7400201
406     * @tc.size      : MEDIUM
407     * @tc.type      : Function
408     * @tc.level     : Level 2
409     */
410    it('createCameraInput_two_params_008', Level.LEVEL2, async (done: Function) => {
411      const testName = 'createCameraInput_two_params_008';
412      let position: camera.CameraPosition = cameraPosition.CAMERA_POSITION_BACK;
413      let type: camera.CameraType = cameraType.CAMERA_TYPE_ULTRA_WIDE;
414      getInputWithTwoParamsTest(done, testName, position, type);
415    })
416
417    /**
418     * @tc.number    : CAMERA_MANAGER_CREATE_CAMERA_INPUT_020
419     * @tc.name      : createCameraInput_two_params_009
420     * @tc.desc      : cameraPosition->CAMERA_POSITION_BACK, cameraType->CAMERA_TYPE_TELEPHOTO -> error_code: 7400201
421     * @tc.size      : MEDIUM
422     * @tc.type      : Function
423     * @tc.level     : Level 2
424     */
425    it('createCameraInput_two_params_009', Level.LEVEL2, async (done: Function) => {
426      const testName = 'createCameraInput_two_params_009';
427      let position: camera.CameraPosition = cameraPosition.CAMERA_POSITION_BACK;
428      let type: camera.CameraType = cameraType.CAMERA_TYPE_TELEPHOTO;
429      getInputWithTwoParamsTest(done, testName, position, type);
430    })
431
432    /**
433     * @tc.number    : CAMERA_MANAGER_CREATE_CAMERA_INPUT_021
434     * @tc.name      : createCameraInput_two_params_010
435     * @tc.desc      : cameraPosition->CAMERA_POSITION_BACK, cameraType->CAMERA_TYPE_TRUE_DEPTH -> error_code: 7400201
436     * @tc.size      : MEDIUM
437     * @tc.type      : Function
438     * @tc.level     : Level 2
439     */
440    it('createCameraInput_two_params_010', Level.LEVEL2, async (done: Function) => {
441      const testName = 'createCameraInput_two_params_010';
442      let position: camera.CameraPosition = cameraPosition.CAMERA_POSITION_BACK;
443      let type: camera.CameraType = cameraType.CAMERA_TYPE_TRUE_DEPTH;
444      getInputWithTwoParamsTest(done, testName, position, type);
445    })
446
447    /**
448     * @tc.number    : CAMERA_MANAGER_CREATE_CAMERA_INPUT_022
449     * @tc.name      : createCameraInput_two_params_011
450     * @tc.desc      : cameraPosition->CAMERA_POSITION_FRONT, cameraType->CAMERA_TYPE_DEFAULT -> error_code: 7400201
451     * @tc.size      : MEDIUM
452     * @tc.type      : Function
453     * @tc.level     : Level 2
454     */
455    it('createCameraInput_two_params_011', Level.LEVEL2, async (done: Function) => {
456      const testName = 'createCameraInput_two_params_011';
457      let position: camera.CameraPosition = cameraPosition.CAMERA_POSITION_FRONT;
458      let type: camera.CameraType = cameraType.CAMERA_TYPE_DEFAULT;
459      getInputWithTwoParamsTest(done, testName, position, type);
460    })
461
462    /**
463     * @tc.number    : CAMERA_MANAGER_CREATE_CAMERA_INPUT_023
464     * @tc.name      : createCameraInput_two_params_012
465     * @tc.desc      : cameraPosition->CAMERA_POSITION_FRONT, cameraType->CAMERA_TYPE_WIDE_ANGLE -> pass
466     * @tc.size      : MEDIUM
467     * @tc.type      : Function
468     * @tc.level     : Level 2
469     */
470    it('createCameraInput_two_params_012', Level.LEVEL2, async (done: Function) => {
471      const testName = 'createCameraInput_two_params_012';
472      let position: camera.CameraPosition = cameraPosition.CAMERA_POSITION_FRONT;
473      let type: camera.CameraType = cameraType.CAMERA_TYPE_WIDE_ANGLE;
474      getInputWithTwoParamsTest(done, testName, position, type);
475    })
476
477    /**
478     * @tc.number    : CAMERA_MANAGER_CREATE_CAMERA_INPUT_024
479     * @tc.name      : createCameraInput_two_params_013
480     * @tc.desc      : cameraPosition->CAMERA_POSITION_FRONT, cameraType->CAMERA_TYPE_ULTRA_WIDE -> error_code: 7400201
481     * @tc.size      : MEDIUM
482     * @tc.type      : Function
483     * @tc.level     : Level 2
484     */
485    it('createCameraInput_two_params_013', Level.LEVEL2, async (done: Function) => {
486      const testName = 'createCameraInput_two_params_013';
487      let position: camera.CameraPosition = cameraPosition.CAMERA_POSITION_FRONT;
488      let type: camera.CameraType = cameraType.CAMERA_TYPE_ULTRA_WIDE;
489      getInputWithTwoParamsTest(done, testName, position, type);
490    })
491
492    /**
493     * @tc.number    : CAMERA_MANAGER_CREATE_CAMERA_INPUT_025
494     * @tc.name      : createCameraInput_two_params_014
495     * @tc.desc      : cameraPosition->CAMERA_POSITION_FRONT, cameraType->CAMERA_TYPE_TELEPHOTO -> error_code: 7400201
496     * @tc.size      : MEDIUM
497     * @tc.type      : Function
498     * @tc.level     : Level 2
499     */
500    it('createCameraInput_two_params_014', Level.LEVEL2, async (done: Function) => {
501      const testName = 'createCameraInput_two_params_014';
502      let position: camera.CameraPosition = cameraPosition.CAMERA_POSITION_FRONT;
503      let type: camera.CameraType = cameraType.CAMERA_TYPE_TELEPHOTO;
504      getInputWithTwoParamsTest(done, testName, position, type);
505    })
506
507    /**
508     * @tc.number    : CAMERA_MANAGER_CREATE_CAMERA_INPUT_026
509     * @tc.name      : createCameraInput_two_params_015
510     * @tc.desc      : cameraPosition->CAMERA_POSITION_FRONT, cameraType->CAMERA_TYPE_TRUE_DEPTH -> error_code: 7400201
511     * @tc.size      : MEDIUM
512     * @tc.type      : Function
513     * @tc.level     : Level 2
514     */
515    it('createCameraInput_two_params_015', Level.LEVEL2, async (done: Function) => {
516      const testName = 'createCameraInput_two_params_015';
517      let position: camera.CameraPosition = cameraPosition.CAMERA_POSITION_FRONT;
518      let type: camera.CameraType = cameraType.CAMERA_TYPE_TRUE_DEPTH;
519      getInputWithTwoParamsTest(done, testName, position, type);
520    })
521  })
522}