• NymeaTestBase
  • NymeaTestBase Class

    (nymeaserver::NymeaTestBase)
    Inherits:

    Public Functions

    NymeaTestBase(QObject * parent = nullptr)

    Protected Functions

    QVariant checkNotification(const QSignalSpy & spy, const QString & notification)
    QVariantList checkNotifications(const QSignalSpy & spy, const QString & notification)
    void clearLoggingDatabase()
    QVariant deleteAndWait(const QNetworkRequest & request, const int & expectedStatus = 200)
    bool disableNotifications()
    bool enableNotifications()
    QVariant getAndWait(const QNetworkRequest & request, const int & expectedStatus = 200)
    QVariant injectAndWait(const QString & method, const QVariantMap & params = QVariantMap(), const QUuid & clientId = QUuid())
    QVariant postAndWait(const QNetworkRequest & request, const QVariant & params, const int & expectedStatus = 200)
    void printJson(const QVariant & response)
    QVariant putAndWait(const QNetworkRequest & request, const QVariant & params, const int & expectedStatus = 200)
    void restartServer()
    void verifyConfigurationError(const QVariant & response, NymeaConfiguration::ConfigurationError error = NymeaConfiguration::ConfigurationErrorNoError)
    void verifyDeviceError(const QVariant & response, DeviceManager::DeviceError error = DeviceManager::DeviceErrorNoError)
    void verifyError(const QVariant & response, const QString & fieldName, const QString & error)
    void verifyLoggingError(const QVariant & response, Logging::LoggingError error = Logging::LoggingErrorNoError)
    void verifyParams(const QVariantList & requestList, const QVariantList & responseList, bool allRequired = true)
    void verifyReply(QNetworkReply * reply, const QByteArray & data, const int & expectedStatus)
    void verifyRuleError(const QVariant & response, RuleEngine::RuleError error = RuleEngine::RuleErrorNoError)
    void verifyTagError(const QVariant & response, TagsStorage::TagError error = TagsStorage::TagErrorNoError)

    Protected Slots

    void cleanup()
    void cleanupTestCase()
    void initTestCase()

    Member Function Documentation

    NymeaTestBase::NymeaTestBase(QObject * parent = nullptr)

    [protected] QVariant NymeaTestBase::checkNotification(const QSignalSpy & spy, const QString & notification)

    [protected] QVariantList NymeaTestBase::checkNotifications(const QSignalSpy & spy, const QString & notification)

    [protected slot] void NymeaTestBase::cleanup()

    [protected slot] void NymeaTestBase::cleanupTestCase()

    [protected] void NymeaTestBase::clearLoggingDatabase()

    [protected] QVariant NymeaTestBase::deleteAndWait(const QNetworkRequest & request, const int & expectedStatus = 200)

    [protected] bool NymeaTestBase::disableNotifications()

    [protected] bool NymeaTestBase::enableNotifications()

    [protected] QVariant NymeaTestBase::getAndWait(const QNetworkRequest & request, const int & expectedStatus = 200)

    [protected slot] void NymeaTestBase::initTestCase()

    [protected] QVariant NymeaTestBase::injectAndWait(const QString & method, const QVariantMap & params = QVariantMap(), const QUuid & clientId = QUuid())

    [protected] QVariant NymeaTestBase::postAndWait(const QNetworkRequest & request, const QVariant & params, const int & expectedStatus = 200)

    [protected] void NymeaTestBase::printJson(const QVariant & response)

    [protected] QVariant NymeaTestBase::putAndWait(const QNetworkRequest & request, const QVariant & params, const int & expectedStatus = 200)

    [protected] void NymeaTestBase::restartServer()

    [protected] void NymeaTestBase::verifyConfigurationError(const QVariant & response, NymeaConfiguration::ConfigurationError error = NymeaConfiguration::ConfigurationErrorNoError)

    [protected] void NymeaTestBase::verifyDeviceError(const QVariant & response, DeviceManager::DeviceError error = DeviceManager::DeviceErrorNoError)

    [protected] void NymeaTestBase::verifyError(const QVariant & response, const QString & fieldName, const QString & error)

    [protected] void NymeaTestBase::verifyLoggingError(const QVariant & response, Logging::LoggingError error = Logging::LoggingErrorNoError)

    [protected] void NymeaTestBase::verifyParams(const QVariantList & requestList, const QVariantList & responseList, bool allRequired = true)

    [protected] void NymeaTestBase::verifyReply(QNetworkReply * reply, const QByteArray & data, const int & expectedStatus)

    [protected] void NymeaTestBase::verifyRuleError(const QVariant & response, RuleEngine::RuleError error = RuleEngine::RuleErrorNoError)

    [protected] void NymeaTestBase::verifyTagError(const QVariant & response, TagsStorage::TagError error = TagsStorage::TagErrorNoError)