From 2897719af77a5307491bbe06e20edbd4c24ea071 Mon Sep 17 00:00:00 2001 From: sunshenshen Date: Fri, 5 May 2023 07:36:22 +0000 Subject: [PATCH] Modification of SUB_MEDIA_MEDIALIBRARY_ASSET_NETWORKID_PROMISE_006 Signed-off-by: sunshenshen --- .../src/main/ets/test/mediafetchoptionsPromise.test.ets | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/multimedia/medialibrary/mediaLibrary_mediafetchoptions/entry/src/main/ets/test/mediafetchoptionsPromise.test.ets b/multimedia/medialibrary/mediaLibrary_mediafetchoptions/entry/src/main/ets/test/mediafetchoptionsPromise.test.ets index f684ebe81..87d79865a 100644 --- a/multimedia/medialibrary/mediaLibrary_mediafetchoptions/entry/src/main/ets/test/mediafetchoptionsPromise.test.ets +++ b/multimedia/medialibrary/mediaLibrary_mediafetchoptions/entry/src/main/ets/test/mediafetchoptionsPromise.test.ets @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 Huawei Device Co., Ltd. + * Copyright (C) 2022-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -187,11 +187,12 @@ export default function mediafetchoptionsPromise(abilityContext) { }; try { const fetchFileResult = await media.getFileAssets(currentFetchOps); - expect(false).assertTrue(); + let count = await fetchFileResult.getCount(); + expect(count == 0).assertTrue(); fetchFileResult.close(); done(); } catch (err) { - expect(true).assertTrue(); + expect(false).assertTrue(); done(); } } catch (error) { -- GitLab