2012-05-08 16:03:59 -04:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2012 Felix Geyer <debfx@fobos.de>
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 2 or (at your option)
|
|
|
|
* version 3 of the License.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef KEEPASSX_TESTKEEPASS1READER_H
|
|
|
|
#define KEEPASSX_TESTKEEPASS1READER_H
|
|
|
|
|
2013-10-03 09:18:16 -04:00
|
|
|
#include <QDateTime>
|
|
|
|
#include <QObject>
|
2012-05-08 16:03:59 -04:00
|
|
|
|
2012-05-10 05:44:25 -04:00
|
|
|
class Database;
|
|
|
|
|
2012-05-08 16:03:59 -04:00
|
|
|
class TestKeePass1Reader : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
private Q_SLOTS:
|
|
|
|
void initTestCase();
|
|
|
|
void testBasic();
|
2012-05-10 16:46:36 -04:00
|
|
|
void testMasterKey();
|
2012-05-10 05:44:25 -04:00
|
|
|
void testCustomIcons();
|
|
|
|
void testGroupExpanded();
|
2012-07-19 17:21:12 -04:00
|
|
|
void testAutoType();
|
2012-05-10 13:34:55 -04:00
|
|
|
void testFileKey();
|
|
|
|
void testFileKey_data();
|
|
|
|
void testCompositeKey();
|
2012-05-10 15:06:33 -04:00
|
|
|
void testTwofish();
|
2012-05-10 15:29:10 -04:00
|
|
|
void testCP1252Password();
|
2012-05-10 05:44:25 -04:00
|
|
|
void cleanupTestCase();
|
2012-05-09 17:14:27 -04:00
|
|
|
|
|
|
|
private:
|
|
|
|
static QDateTime genDT(int year, int month, int day, int hour, int min);
|
2012-05-10 17:00:29 -04:00
|
|
|
static void reopenDatabase(Database* db, const QString& password, const QString& keyfileName);
|
2012-05-10 05:44:25 -04:00
|
|
|
|
|
|
|
Database* m_db;
|
2012-05-08 16:03:59 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // KEEPASSX_TESTKEEPASS1READER_H
|