/*
  SPDX-FileCopyrightText: 2025-2026 Laurent Montel <montel@kde.org>

  SPDX-License-Identifier: GPL-2.0-or-later
*/

#include "textautogeneratesearchjobtest.h"
#include "core/jobs/textautogeneratesearchjob.h"
#include <QTest>
QTEST_GUILESS_MAIN(TextAutoGenerateSearchJobTest)

TextAutoGenerateSearchJobTest::TextAutoGenerateSearchJobTest(QObject *parent)
    : QObject{parent}
{
}

void TextAutoGenerateSearchJobTest::shouldHaveDefaultValues()
{
    TextAutoGenerateText::TextAutoGenerateSearchJob job(nullptr);
    QVERIFY(job.searchText().isEmpty());
    QVERIFY(!job.canStart());
}

void TextAutoGenerateSearchJobTest::shouldNotStartForWhitespaceOnlySearchText()
{
    TextAutoGenerateText::TextAutoGenerateSearchJob job(nullptr);
    job.setSearchText(QStringLiteral("   \t\n"));
    QVERIFY(!job.canStart());
}

#include "moc_textautogeneratesearchjobtest.cpp"
