Debian Codegraph @

tests/dbusproxy/ut_dldbusinterface.cpp

raw symbols SCIP
1 // SPDX-FileCopyrightText: 2019 - 2022 UnionTech Software Technology Co., Ltd.
2 //
3 // SPDX-License-Identifier: GPL-3.0-or-later
4
5 #include "dldbusinterface.h"
6 #include "qtcompat.h"
7
8 #include <stub.h>
9
10 #include <QDebug>
11
12 #include <gtest/gtest.h>
13
14 class DlDbusinterface_UT : public testing::Test
15 {
16 public:
17 //添加日志
18 static void SetUpTestCase()
19 {
20 qDebug() << "SetUpTestCase" << ENDL;
21 }
22 static void TearDownTestCase()
23 {
24 qDebug() << "TearDownTestCase" << ENDL;
25 }
26 void SetUp() //TEST跑之前会执行SetUp
27 {
28 m_interface = new DeepinLogviewerInterface("test", "test", QDBusConnection::systemBus());
29 qDebug() << "SetUp" << ENDL;
30 }
31 void TearDown() //TEST跑完之后会执行TearDown
32 {
33 delete m_interface;
34 }
35 DeepinLogviewerInterface *m_interface;
36 };
37
38 TEST_F(DlDbusinterface_UT, Compare_UT)
39 {
40 m_interface->exitCode();
41 m_interface->exportLog("path", "path1", false);
42 m_interface->getFileInfo("path", false);
43 m_interface->quit();
44 m_interface->readLog("Test");
45 }