QtLingo 1
QtLingo is an Application to make Qt Computer Translations easier
tst_qtlingocase.cpp
Go to the documentation of this file.
1#include <QtTest>
2#include <QCoreApplication>
3
4#include "MyOrgSettings.h"
5
6
10class QtLingoCase : public QObject
11{
12 Q_OBJECT
13
14 public:
17
18 private slots:
19 void initTestCase();
20 void cleanupTestCase();
21 void test_case1();
22
23};
24
29{
30
31}
32
37{
38
39}
40
44void QtLingoCase::initTestCase()
45{
46 MyOrgSettings *myOrgSettings = new MyOrgSettings(this);
47 QCOMPARE(myOrgSettings->getAppName(), qApp->applicationName());
48}
49
53void QtLingoCase::cleanupTestCase()
54{
55
56}
57
61void QtLingoCase::test_case1()
62{
63 QString theTest = "This is my Secret";
64 MyOrgSettings *myOrgSettings = new MyOrgSettings(this);
65 QCOMPARE(theTest, myOrgSettings->decryptThis(myOrgSettings->encryptThis(theTest)));
66}
67
71QTEST_MAIN(QtLingoCase)
72
73#include "tst_qtlingocase.moc"
74
My Org Settings.
Definition: MyOrgSettings.h:35
QString getAppName()
my Application Name
QString decryptThis(const QString &thisSecret)
decrypt This
QString encryptThis(const QString &thisSecret)
encrypt This
QtLingoCase Class. /class QtLingoCase.
~QtLingoCase()
QtLingoCase Deconstructor. QtLingoCase.
QtLingoCase()
QtLingoCase Constructor. QtLingoCase.