Commit f8f6a40d authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Add basic autotest for broadbandinfo parser

In !33 we are adding new functionality to it that we want to be autotested.

Add basic test infrastructure for that.

The test is currently minimal but will be extended in the future.
parent 159e5446
......@@ -17,3 +17,8 @@ ecm_add_test(
simpleiplisttest.cpp
LINK_LIBRARIES Qt::Test plasmanm_editor
)
ecm_add_test(
mobileproviderstest.cpp
LINK_LIBRARIES Qt::Test plasmanm_editor
)
/*
SPDX-FileCopyrightText: 2021 Nicolas Fella <nicolas.fella@gmx.de>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
#include "mobileproviders.h"
#include <QTest>
class MobileProvidersTest : public QObject
{
Q_OBJECT
private Q_SLOTS:
void testProviders();
};
void MobileProvidersTest::testProviders()
{
MobileProviders providers;
const QStringList germanProviders = providers.getProvidersList(QStringLiteral("DE"), NetworkManager::ConnectionSettings::Gsm);
QVERIFY(germanProviders.contains(QStringLiteral("Vodafone")));
}
QTEST_GUILESS_MAIN(MobileProvidersTest)
#include "mobileproviderstest.moc"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment