AusweisApp2/test/qt/global/test_FileDestination.cpp

33 lines
589 B
C++
Raw Normal View History

2017-07-03 09:30:10 +02:00
/*!
* \brief Unit tests for \ref FileDestination
*
2019-05-22 10:08:38 +02:00
* \copyright Copyright (c) 2014-2019 Governikus GmbH & Co. KG, Germany
2017-07-03 09:30:10 +02:00
*/
#include "FileDestination.h"
#include <QFile>
#include <QtTest>
using namespace governikus;
class test_FileDestination
: public QObject
{
Q_OBJECT
private Q_SLOTS:
void getPath()
{
2019-09-30 17:22:19 +02:00
const auto filename = QStringLiteral("config.json");
QString path = FileDestination::getPath(filename);
QVERIFY(path.endsWith(filename));
2017-07-03 09:30:10 +02:00
QVERIFY(QFile::exists(path));
}
};
QTEST_GUILESS_MAIN(test_FileDestination)
#include "test_FileDestination.moc"