2017-07-03 09:30:10 +02:00
|
|
|
/*!
|
|
|
|
* \brief Unit tests for \ref UserAgent
|
|
|
|
*
|
2018-03-28 15:10:51 +02:00
|
|
|
* \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany
|
2017-07-03 09:30:10 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "paos/element/UserAgent.h"
|
|
|
|
|
|
|
|
#include <QCoreApplication>
|
|
|
|
#include <QtTest>
|
|
|
|
|
|
|
|
using namespace governikus;
|
|
|
|
|
|
|
|
class test_UserAgent
|
|
|
|
: public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
private Q_SLOTS:
|
|
|
|
void getter()
|
|
|
|
{
|
|
|
|
QCoreApplication::setApplicationVersion("1.32.4");
|
|
|
|
|
|
|
|
UserAgent obj;
|
|
|
|
QCOMPARE(obj.getName(), QString("Test_core_paos_UserAgent"));
|
|
|
|
QCOMPARE(obj.getVersionMajor(), QString("1"));
|
|
|
|
QCOMPARE(obj.getVersionMinor(), QString("32"));
|
|
|
|
QCOMPARE(obj.getVersionSubminor(), QString("4"));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
QTEST_GUILESS_MAIN(test_UserAgent)
|
|
|
|
#include "test_UserAgent.moc"
|