| 1 | // SPDX-FileCopyrightText: 2019 - 2022 UnionTech Software Technology Co., Ltd. |
| 2 | // |
| 3 | // SPDX-License-Identifier: GPL-3.0-or-later |
| 4 | |
| 5 | #include "dldbushandler.h" |
| 6 | #include "logfileparser.h" |
| 7 | |
| 8 | #include <stub.h> |
| 9 | #include <QDebug> |
| 10 | #include <gtest/gtest.h> |
| 11 | |
| 12 | |
| 13 | TEST(UT_DLDBusHandler_readLog, UT_DLDBusHandler_readLog_001) |
| 14 | { |
| 15 | DLDBusHandler *DLDbus = new DLDBusHandler(); |
| 16 | ASSERT_TRUE(DLDbus); |
| 17 | DLDbus->readLog("test"); |
| 18 | delete DLDbus; |
| 19 | } |
| 20 | |
| 21 | TEST(UT_DLDBusHandler_exitCode, UT_DLDBusHandler_exitCode_001) |
| 22 | { |
| 23 | DLDBusHandler *DLDbus = new DLDBusHandler(); |
| 24 | ASSERT_TRUE(DLDbus); |
| 25 | DLDbus->exitCode(); |
| 26 | delete DLDbus; |
| 27 | } |
| 28 | |
| 29 | TEST(UT_DLDBusHandler_quit, UT_DLDBusHandler_quit_001) |
| 30 | { |
| 31 | DLDBusHandler *DLDbus = new DLDBusHandler(); |
| 32 | ASSERT_TRUE(DLDbus); |
| 33 | DLDbus->quit(); |
| 34 | delete DLDbus; |
| 35 | } |
| 36 | |
| 37 | |
| 38 | TEST(UT_DLDBusHandler_exportLog, UT_DLDBusHandler_exportLog_001) |
| 39 | { |
| 40 | DLDBusHandler *DLDbus = new DLDBusHandler(); |
| 41 | ASSERT_TRUE(DLDbus); |
| 42 | DLDbus->exportLog("path", "path1", false); |
| 43 | delete DLDbus; |
| 44 | } |
| 45 | |
| 46 |