1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date        : 2018-10-30
7  * Description : An unit-test to read metadata and apply tag paths to item with DMetadata.
8  *
9  * Copyright (C) 2019-2021 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  *
11  * This program is free software; you can redistribute it
12  * and/or modify it under the terms of the GNU General
13  * Public License as published by the Free Software Foundation;
14  * either version 2, or (at your option)
15  * any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20  * GNU General Public License for more details.
21  *
22  * ============================================================ */
23 
24 #ifndef DIGIKAM_APPLY_TAGS_UTEST_H
25 #define DIGIKAM_APPLY_TAGS_UTEST_H
26 
27 // Local includes
28 
29 #include "abstractunittest.h"
30 #include "metaenginesettingscontainer.h"
31 #include "dmetadatasettingscontainer.h"
32 
33 using namespace Digikam;
34 
35 class ApplyTagsTest : public AbstractUnitTest
36 {
37     Q_OBJECT
38 
39 public:
40 
41     explicit ApplyTagsTest(QObject* const parent = nullptr);
42 
43 private:
44 
45     void applyTags(const QString& file,
46                    const QStringList& tags,
47                    const MetaEngineSettingsContainer& settings,
48                    bool  expectedRead,
49                    bool  expectedWrite);
50 
51 private Q_SLOTS:
52 
53     void testApplyTagsToMetadata();
54 };
55 
56 #endif // DIGIKAM_APPLY_TAGS_UTEST_H
57