File indexing completed on 2025-02-16 13:12:22
0001 /* 0002 This file is part of the kxmlrpc library. 0003 SPDX-FileCopyrightText: 2006 Narayan Newton <narayannewton@gmail.com> 0004 0005 SPDX-License-Identifier: LGPL-2.0-or-later 0006 */ 0007 0008 #include <qtest.h> 0009 0010 #include "clienttest.h" 0011 0012 QTEST_GUILESS_MAIN(ClientTest) 0013 0014 #include "client.h" 0015 0016 using namespace KXmlRpc; 0017 0018 void ClientTest::testValidity() 0019 { 0020 Client *c = new Client(); 0021 c->setUrl(QUrl(QLatin1String("http://test:pass@fake.com/rpc2"))); 0022 c->setUserAgent(QLatin1String("Fake/1.0/MozillaCompat")); 0023 c->setDigestAuthEnabled(true); 0024 QVERIFY(c->url() == QUrl(QLatin1String("http://test:pass@fake.com/rpc2"))); 0025 QVERIFY(c->userAgent() == QLatin1String("Fake/1.0/MozillaCompat")); 0026 QVERIFY(c->isDigestAuthEnabled() == true); 0027 0028 Client *other = new Client(QUrl(QLatin1String("http://test:pass@fake.com/rpc2"))); 0029 QVERIFY(c->url() == other->url()); 0030 0031 delete c; 0032 delete other; 0033 } 0034 0035 #include "moc_clienttest.cpp"