/* * SPDX-FileCopyrightText: 2012 Aleix Pol Gonzalez * * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ #pragma once #include "ReviewsBackend/ReviewsModel.h" #include #include class AbstractResourcesBackend; class AbstractResource; class ResultsStream; class KNSBackendTest : public QObject { Q_OBJECT public: explicit KNSBackendTest(QObject *parent = nullptr); private Q_SLOTS: void testRetrieval(); void testReviews(); void testResourceByUrl(); void testResourceByUrlResourcesModel(); public Q_SLOTS: void reviewsArrived(AbstractResource *r, const QVector &revs); private: QVector getResources(ResultsStream *stream, bool canBeEmpty = false); QVector getAllResources(AbstractResourcesBackend *backend); QPointer m_backend; QPointer m_resource; QVector m_reviews; };