14 void passwordConfigurationDefaults();
15 void passwordConfigurationSetters();
16 void passwordConfigurationCharacterSets();
17 void passwordConfigurationLength();
18 void passwordConfigurationCustomChars();
21void tst_passwordconfig::initTestCase() {
27void tst_passwordconfig::passwordConfigurationDefaults() {
28 PasswordConfiguration config;
29 QCOMPARE(config.
length, 16);
36void tst_passwordconfig::passwordConfigurationSetters() {
47 QCOMPARE(config.
length, 24);
55void tst_passwordconfig::passwordConfigurationCharacterSets() {
56 PasswordConfiguration config;
63void tst_passwordconfig::passwordConfigurationLength() {
64 PasswordConfiguration config;
66 QCOMPARE(config.
length, 0);
68 QCOMPARE(config.
length, 100);
71void tst_passwordconfig::passwordConfigurationCustomChars() {
72 PasswordConfiguration config;
73 QString custom =
"abc123";
79#include "tst_passwordconfig.moc"
static auto getPasswordConfiguration() -> PasswordConfiguration
Get complete password generation configuration.
static void setPasswordLength(const int &passwordLength)
Save password length setting.
static void setPasswordChars(const QString &passwordChars)
Save custom password characters.
static void setPasswordCharsselection(const int &passwordCharsSelection)
Save password character selection mode.
int length
Length of the password.
enum PasswordConfiguration::characterSet selected
QString Characters[CHARSETS_COUNT]
The different character sets.