Changeset View
Changeset View
Standalone View
Standalone View
tests/units/akonadi/akonaditaskqueriestest.cpp
Show First 20 Lines • Show All 534 Lines • ▼ Show 20 Line(s) | 532 | { | |||
---|---|---|---|---|---|
535 | 535 | | |||
536 | // Two top level collections | 536 | // Two top level collections | ||
537 | data.createCollection(GenCollection().withId(42).withRootAsParent().withTaskContent()); | 537 | data.createCollection(GenCollection().withId(42).withRootAsParent().withTaskContent()); | ||
538 | data.createCollection(GenCollection().withId(43).withRootAsParent().withTaskContent()); | 538 | data.createCollection(GenCollection().withId(43).withRootAsParent().withTaskContent()); | ||
539 | 539 | | |||
540 | // One task in the first collection | 540 | // One task in the first collection | ||
541 | data.createItem(GenTodo().withId(42).withParent(42).withTitle(QStringLiteral("42"))); | 541 | data.createItem(GenTodo().withId(42).withParent(42).withTitle(QStringLiteral("42"))); | ||
542 | 542 | | |||
543 | // Two tasks in the second collection | 543 | // Two toplevel tasks in the second collection, one with a child | ||
544 | data.createItem(GenTodo().withId(43).withParent(43).withTitle(QStringLiteral("43"))); | 544 | data.createItem(GenTodo().withId(43).withUid("parent-43").withParent(43).withTitle(QStringLiteral("43"))); | ||
545 | data.createItem(GenTodo().withId(44).withParent(43).withTitle(QStringLiteral("44")).withParentUid(QStringLiteral("2"))); | 545 | data.createItem(GenTodo().withId(44).withParent(43).withTitle(QStringLiteral("44")).withParentUid(QStringLiteral("2"))); // non-existing parent | ||
546 | data.createItem(GenTodo().withId(45).withParent(43).withTitle(QStringLiteral("45")).withParentUid(QStringLiteral("parent-43"))); // existing parent | ||||
546 | 547 | | |||
547 | // WHEN | 548 | // WHEN | ||
548 | QScopedPointer<Domain::TaskQueries> queries(new Akonadi::TaskQueries(Akonadi::StorageInterface::Ptr(data.createStorage()), | 549 | QScopedPointer<Domain::TaskQueries> queries(new Akonadi::TaskQueries(Akonadi::StorageInterface::Ptr(data.createStorage()), | ||
549 | Akonadi::Serializer::Ptr(new Akonadi::Serializer), | 550 | Akonadi::Serializer::Ptr(new Akonadi::Serializer), | ||
550 | Akonadi::MonitorInterface::Ptr(data.createMonitor()), | 551 | Akonadi::MonitorInterface::Ptr(data.createMonitor()), | ||
551 | Akonadi::Cache::Ptr())); | 552 | Akonadi::Cache::Ptr())); | ||
552 | auto result = queries->findTopLevel(); | 553 | auto result = queries->findInboxTopLevel(); | ||
553 | result->data(); | 554 | result->data(); | ||
554 | result = queries->findTopLevel(); // Should not cause any problem or wrong data | 555 | result = queries->findInboxTopLevel(); // Should not cause any problem or wrong data | ||
555 | 556 | | |||
556 | // THEN | 557 | // THEN | ||
557 | QVERIFY(result->data().isEmpty()); | 558 | QVERIFY(result->data().isEmpty()); | ||
558 | TestHelpers::waitForEmptyJobQueue(); | 559 | TestHelpers::waitForEmptyJobQueue(); | ||
559 | 560 | | |||
560 | QCOMPARE(result->data().size(), 2); | 561 | QCOMPARE(result->data().size(), 2); | ||
561 | QCOMPARE(result->data().at(0)->title(), QStringLiteral("42")); | 562 | QCOMPARE(result->data().at(0)->title(), QStringLiteral("42")); | ||
562 | QCOMPARE(result->data().at(1)->title(), QStringLiteral("43")); | 563 | QCOMPARE(result->data().at(1)->title(), QStringLiteral("43")); | ||
563 | } | 564 | } | ||
564 | 565 | | |||
565 | void shouldReactToItemAddsForTopLevelTasks() | 566 | void shouldReactToItemAddsForTopLevelTasks() | ||
566 | { | 567 | { | ||
567 | // GIVEN | 568 | // GIVEN | ||
568 | AkonadiFakeData data; | 569 | AkonadiFakeData data; | ||
569 | 570 | | |||
570 | // One top level collection | 571 | // One top level collection | ||
571 | data.createCollection(GenCollection().withId(42).withRootAsParent().withTaskContent()); | 572 | data.createCollection(GenCollection().withId(42).withRootAsParent().withTaskContent()); | ||
572 | 573 | | |||
573 | QScopedPointer<Domain::TaskQueries> queries(new Akonadi::TaskQueries(Akonadi::StorageInterface::Ptr(data.createStorage()), | 574 | QScopedPointer<Domain::TaskQueries> queries(new Akonadi::TaskQueries(Akonadi::StorageInterface::Ptr(data.createStorage()), | ||
574 | Akonadi::Serializer::Ptr(new Akonadi::Serializer), | 575 | Akonadi::Serializer::Ptr(new Akonadi::Serializer), | ||
575 | Akonadi::MonitorInterface::Ptr(data.createMonitor()), | 576 | Akonadi::MonitorInterface::Ptr(data.createMonitor()), | ||
576 | Akonadi::Cache::Ptr())); | 577 | Akonadi::Cache::Ptr())); | ||
577 | auto result = queries->findTopLevel(); | 578 | auto result = queries->findInboxTopLevel(); | ||
578 | TestHelpers::waitForEmptyJobQueue(); | 579 | TestHelpers::waitForEmptyJobQueue(); | ||
579 | QVERIFY(result->data().isEmpty()); | 580 | QVERIFY(result->data().isEmpty()); | ||
580 | 581 | | |||
581 | // WHEN | 582 | // WHEN | ||
582 | data.createItem(GenTodo().withId(42).withParent(42).withTitle(QStringLiteral("42"))); | 583 | data.createItem(GenTodo().withId(42).withParent(42).withTitle(QStringLiteral("42"))); | ||
583 | data.createItem(GenTodo().withId(43).withParent(42).withTitle(QStringLiteral("43")).withParentUid(QStringLiteral("2"))); | 584 | data.createItem(GenTodo().withId(43).withParent(42).withTitle(QStringLiteral("43")).withParentUid(QStringLiteral("2"))); | ||
584 | 585 | | |||
585 | // THEN | 586 | // THEN | ||
Show All 17 Lines | 592 | { | |||
603 | data.createItem(GenTodo().withId(44).withParent(42) | 604 | data.createItem(GenTodo().withId(44).withParent(42) | ||
604 | .withTitle(QStringLiteral("44")).withUid(QStringLiteral("uid-44")) | 605 | .withTitle(QStringLiteral("44")).withUid(QStringLiteral("uid-44")) | ||
605 | .withParentUid(QStringLiteral("uid-43"))); | 606 | .withParentUid(QStringLiteral("uid-43"))); | ||
606 | 607 | | |||
607 | QScopedPointer<Domain::TaskQueries> queries(new Akonadi::TaskQueries(Akonadi::StorageInterface::Ptr(data.createStorage()), | 608 | QScopedPointer<Domain::TaskQueries> queries(new Akonadi::TaskQueries(Akonadi::StorageInterface::Ptr(data.createStorage()), | ||
608 | Akonadi::Serializer::Ptr(new Akonadi::Serializer), | 609 | Akonadi::Serializer::Ptr(new Akonadi::Serializer), | ||
609 | Akonadi::MonitorInterface::Ptr(data.createMonitor()), | 610 | Akonadi::MonitorInterface::Ptr(data.createMonitor()), | ||
610 | Akonadi::Cache::Ptr())); | 611 | Akonadi::Cache::Ptr())); | ||
611 | auto result = queries->findTopLevel(); | 612 | auto result = queries->findInboxTopLevel(); | ||
612 | TestHelpers::waitForEmptyJobQueue(); | 613 | TestHelpers::waitForEmptyJobQueue(); | ||
613 | QCOMPARE(result->data().size(), 2); | 614 | QCOMPARE(result->data().size(), 2); | ||
614 | 615 | | |||
615 | // WHEN | 616 | // WHEN | ||
616 | data.removeItem(Akonadi::Item(43)); | 617 | data.removeItem(Akonadi::Item(43)); | ||
617 | 618 | | |||
618 | // THEN | 619 | // THEN | ||
619 | QCOMPARE(result->data().size(), 1); | 620 | QCOMPARE(result->data().size(), 1); | ||
Show All 16 Lines | 625 | { | |||
636 | data.createItem(GenTodo().withId(44).withParent(42) | 637 | data.createItem(GenTodo().withId(44).withParent(42) | ||
637 | .withTitle(QStringLiteral("44")).withUid(QStringLiteral("uid-44")) | 638 | .withTitle(QStringLiteral("44")).withUid(QStringLiteral("uid-44")) | ||
638 | .withParentUid(QStringLiteral("uid-43"))); | 639 | .withParentUid(QStringLiteral("uid-43"))); | ||
639 | 640 | | |||
640 | QScopedPointer<Domain::TaskQueries> queries(new Akonadi::TaskQueries(Akonadi::StorageInterface::Ptr(data.createStorage()), | 641 | QScopedPointer<Domain::TaskQueries> queries(new Akonadi::TaskQueries(Akonadi::StorageInterface::Ptr(data.createStorage()), | ||
641 | Akonadi::Serializer::Ptr(new Akonadi::Serializer), | 642 | Akonadi::Serializer::Ptr(new Akonadi::Serializer), | ||
642 | Akonadi::MonitorInterface::Ptr(data.createMonitor()), | 643 | Akonadi::MonitorInterface::Ptr(data.createMonitor()), | ||
643 | Akonadi::Cache::Ptr())); | 644 | Akonadi::Cache::Ptr())); | ||
644 | auto result = queries->findTopLevel(); | 645 | auto result = queries->findInboxTopLevel(); | ||
645 | // Even though the pointer didn't change it's convenient to user if we call | 646 | // Even though the pointer didn't change it's convenient to user if we call | ||
646 | // the replace handlers | 647 | // the replace handlers | ||
647 | bool replaceHandlerCalled = false; | 648 | bool replaceHandlerCalled = false; | ||
648 | result->addPostReplaceHandler([&replaceHandlerCalled](const Domain::Task::Ptr &, int) { | 649 | result->addPostReplaceHandler([&replaceHandlerCalled](const Domain::Task::Ptr &, int) { | ||
649 | replaceHandlerCalled = true; | 650 | replaceHandlerCalled = true; | ||
650 | }); | 651 | }); | ||
651 | TestHelpers::waitForEmptyJobQueue(); | 652 | TestHelpers::waitForEmptyJobQueue(); | ||
652 | QCOMPARE(result->data().size(), 2); | 653 | QCOMPARE(result->data().size(), 2); | ||
Show All 24 Lines | 666 | { | |||
677 | data.createItem(GenTodo().withId(44).withParent(42) | 678 | data.createItem(GenTodo().withId(44).withParent(42) | ||
678 | .withTitle(QStringLiteral("44")).withUid(QStringLiteral("uid-44")) | 679 | .withTitle(QStringLiteral("44")).withUid(QStringLiteral("uid-44")) | ||
679 | .withParentUid(QStringLiteral("uid-43"))); | 680 | .withParentUid(QStringLiteral("uid-43"))); | ||
680 | 681 | | |||
681 | QScopedPointer<Domain::TaskQueries> queries(new Akonadi::TaskQueries(Akonadi::StorageInterface::Ptr(data.createStorage()), | 682 | QScopedPointer<Domain::TaskQueries> queries(new Akonadi::TaskQueries(Akonadi::StorageInterface::Ptr(data.createStorage()), | ||
682 | Akonadi::Serializer::Ptr(new Akonadi::Serializer), | 683 | Akonadi::Serializer::Ptr(new Akonadi::Serializer), | ||
683 | Akonadi::MonitorInterface::Ptr(data.createMonitor()), | 684 | Akonadi::MonitorInterface::Ptr(data.createMonitor()), | ||
684 | Akonadi::Cache::Ptr())); | 685 | Akonadi::Cache::Ptr())); | ||
685 | auto result = queries->findTopLevel(); | 686 | auto result = queries->findInboxTopLevel(); | ||
686 | TestHelpers::waitForEmptyJobQueue(); | 687 | TestHelpers::waitForEmptyJobQueue(); | ||
687 | QCOMPARE(result->data().size(), 2); | 688 | QCOMPARE(result->data().size(), 2); | ||
688 | 689 | | |||
689 | // WHEN | 690 | // WHEN | ||
690 | data.modifyItem(GenTodo(data.item(43)).withParentUid(QStringLiteral("uid-42"))); | 691 | data.modifyItem(GenTodo(data.item(43)).withParentUid(QStringLiteral("uid-42"))); | ||
691 | 692 | | |||
692 | // THEN | 693 | // THEN | ||
693 | QCOMPARE(result->data().size(), 1); | 694 | QCOMPARE(result->data().size(), 1); | ||
Show All 17 Lines | 699 | { | |||
711 | data.createItem(GenTodo().withId(44).withParent(42) | 712 | data.createItem(GenTodo().withId(44).withParent(42) | ||
712 | .withTitle(QStringLiteral("44")).withUid(QStringLiteral("uid-44")) | 713 | .withTitle(QStringLiteral("44")).withUid(QStringLiteral("uid-44")) | ||
713 | .withParentUid(QStringLiteral("uid-43"))); | 714 | .withParentUid(QStringLiteral("uid-43"))); | ||
714 | 715 | | |||
715 | QScopedPointer<Domain::TaskQueries> queries(new Akonadi::TaskQueries(Akonadi::StorageInterface::Ptr(data.createStorage()), | 716 | QScopedPointer<Domain::TaskQueries> queries(new Akonadi::TaskQueries(Akonadi::StorageInterface::Ptr(data.createStorage()), | ||
716 | Akonadi::Serializer::Ptr(new Akonadi::Serializer), | 717 | Akonadi::Serializer::Ptr(new Akonadi::Serializer), | ||
717 | Akonadi::MonitorInterface::Ptr(data.createMonitor()), | 718 | Akonadi::MonitorInterface::Ptr(data.createMonitor()), | ||
718 | Akonadi::Cache::Ptr())); | 719 | Akonadi::Cache::Ptr())); | ||
719 | auto result = queries->findTopLevel(); | 720 | auto result = queries->findInboxTopLevel(); | ||
720 | TestHelpers::waitForEmptyJobQueue(); | 721 | TestHelpers::waitForEmptyJobQueue(); | ||
721 | QCOMPARE(result->data().size(), 1); | 722 | QCOMPARE(result->data().size(), 1); | ||
722 | 723 | | |||
723 | // WHEN | 724 | // WHEN | ||
724 | data.modifyItem(GenTodo(data.item(43)).withParentUid(QString())); | 725 | data.modifyItem(GenTodo(data.item(43)).withParentUid(QString())); | ||
725 | 726 | | |||
726 | // THEN | 727 | // THEN | ||
727 | QCOMPARE(result->data().size(), 2); | 728 | QCOMPARE(result->data().size(), 2); | ||
Show All 17 Lines | 734 | { | |||
745 | data.createItem(GenTodo().withId(44).withParent(42) | 746 | data.createItem(GenTodo().withId(44).withParent(42) | ||
746 | .withTitle(QStringLiteral("44")).withUid(QStringLiteral("uid-44")) | 747 | .withTitle(QStringLiteral("44")).withUid(QStringLiteral("uid-44")) | ||
747 | .withParentUid(QStringLiteral("uid-43"))); | 748 | .withParentUid(QStringLiteral("uid-43"))); | ||
748 | 749 | | |||
749 | QScopedPointer<Domain::TaskQueries> queries(new Akonadi::TaskQueries(Akonadi::StorageInterface::Ptr(data.createStorage()), | 750 | QScopedPointer<Domain::TaskQueries> queries(new Akonadi::TaskQueries(Akonadi::StorageInterface::Ptr(data.createStorage()), | ||
750 | Akonadi::Serializer::Ptr(new Akonadi::Serializer), | 751 | Akonadi::Serializer::Ptr(new Akonadi::Serializer), | ||
751 | Akonadi::MonitorInterface::Ptr(data.createMonitor()), | 752 | Akonadi::MonitorInterface::Ptr(data.createMonitor()), | ||
752 | Akonadi::Cache::Ptr())); | 753 | Akonadi::Cache::Ptr())); | ||
753 | auto result = queries->findTopLevel(); | 754 | auto result = queries->findInboxTopLevel(); | ||
754 | TestHelpers::waitForEmptyJobQueue(); | 755 | TestHelpers::waitForEmptyJobQueue(); | ||
755 | QCOMPARE(result->data().size(), 2); | 756 | QCOMPARE(result->data().size(), 2); | ||
756 | 757 | | |||
757 | auto resultChild = queries->findChildren(result->data().at(1)); | 758 | auto resultChild = queries->findChildren(result->data().at(1)); | ||
758 | TestHelpers::waitForEmptyJobQueue(); | 759 | TestHelpers::waitForEmptyJobQueue(); | ||
759 | QCOMPARE(resultChild->data().size(), 1); | 760 | QCOMPARE(resultChild->data().size(), 1); | ||
760 | 761 | | |||
761 | // WHEN | 762 | // WHEN | ||
▲ Show 20 Lines • Show All 247 Lines • ▼ Show 20 Line(s) | 979 | { | |||
1009 | QFETCH(int, itemsFetchBehavior); | 1010 | QFETCH(int, itemsFetchBehavior); | ||
1010 | data.storageBehavior().setFetchItemsErrorCode(42, itemsErrorCode); | 1011 | data.storageBehavior().setFetchItemsErrorCode(42, itemsErrorCode); | ||
1011 | data.storageBehavior().setFetchItemsBehavior(42, AkonadiFakeStorageBehavior::FetchBehavior(itemsFetchBehavior)); | 1012 | data.storageBehavior().setFetchItemsBehavior(42, AkonadiFakeStorageBehavior::FetchBehavior(itemsFetchBehavior)); | ||
1012 | 1013 | | |||
1013 | QFETCH(bool, deleteQuery); | 1014 | QFETCH(bool, deleteQuery); | ||
1014 | 1015 | | |||
1015 | 1016 | | |||
1016 | // WHEN | 1017 | // WHEN | ||
1017 | auto result = queries->findTopLevel(); | 1018 | auto result = queries->findInboxTopLevel(); | ||
1018 | 1019 | | |||
1019 | if (deleteQuery) | 1020 | if (deleteQuery) | ||
1020 | delete queries.take(); | 1021 | delete queries.take(); | ||
1021 | 1022 | | |||
1022 | // THEN | 1023 | // THEN | ||
1023 | QVERIFY(result->data().isEmpty()); | 1024 | QVERIFY(result->data().isEmpty()); | ||
1024 | TestHelpers::waitForEmptyJobQueue(); | 1025 | TestHelpers::waitForEmptyJobQueue(); | ||
1025 | QVERIFY(result->data().isEmpty()); | 1026 | QVERIFY(result->data().isEmpty()); | ||
Show All 21 Lines | 1030 | { | |||
1047 | data.createItem(GenTodo().withId(45).withParent(43) | 1048 | data.createItem(GenTodo().withId(45).withParent(43) | ||
1048 | .withTitle(QStringLiteral("45")).withUid(QStringLiteral("uid-45")) | 1049 | .withTitle(QStringLiteral("45")).withUid(QStringLiteral("uid-45")) | ||
1049 | .asProject()); | 1050 | .asProject()); | ||
1050 | 1051 | | |||
1051 | QScopedPointer<Domain::TaskQueries> queries(new Akonadi::TaskQueries(Akonadi::StorageInterface::Ptr(data.createStorage()), | 1052 | QScopedPointer<Domain::TaskQueries> queries(new Akonadi::TaskQueries(Akonadi::StorageInterface::Ptr(data.createStorage()), | ||
1052 | Akonadi::Serializer::Ptr(new Akonadi::Serializer), | 1053 | Akonadi::Serializer::Ptr(new Akonadi::Serializer), | ||
1053 | Akonadi::MonitorInterface::Ptr(data.createMonitor()), | 1054 | Akonadi::MonitorInterface::Ptr(data.createMonitor()), | ||
1054 | Akonadi::Cache::Ptr())); | 1055 | Akonadi::Cache::Ptr())); | ||
1055 | auto result = queries->findTopLevel(); | 1056 | auto result = queries->findInboxTopLevel(); | ||
1056 | result->data(); | 1057 | result->data(); | ||
1057 | result = queries->findTopLevel(); // Should not cause any problem or wrong data | 1058 | result = queries->findInboxTopLevel(); // Should not cause any problem or wrong data | ||
1058 | 1059 | | |||
1059 | // THEN | 1060 | // THEN | ||
1060 | QVERIFY(result->data().isEmpty()); | 1061 | QVERIFY(result->data().isEmpty()); | ||
1061 | TestHelpers::waitForEmptyJobQueue(); | 1062 | TestHelpers::waitForEmptyJobQueue(); | ||
1062 | 1063 | | |||
1063 | QCOMPARE(result->data().size(), 2); | 1064 | QCOMPARE(result->data().size(), 2); | ||
1064 | QCOMPARE(result->data().at(0)->title(), QStringLiteral("42")); | 1065 | QCOMPARE(result->data().at(0)->title(), QStringLiteral("42")); | ||
1065 | QCOMPARE(result->data().at(1)->title(), QStringLiteral("43")); | 1066 | QCOMPARE(result->data().at(1)->title(), QStringLiteral("43")); | ||
▲ Show 20 Lines • Show All 736 Lines • ▼ Show 20 Line(s) | 1773 | { | |||
1802 | // WHEN | 1803 | // WHEN | ||
1803 | data.removeItem(Akonadi::Item(1)); | 1804 | data.removeItem(Akonadi::Item(1)); | ||
1804 | 1805 | | |||
1805 | // THEN | 1806 | // THEN | ||
1806 | TestHelpers::waitForEmptyJobQueue(); | 1807 | TestHelpers::waitForEmptyJobQueue(); | ||
1807 | QCOMPARE(result->data().size(), 0); | 1808 | QCOMPARE(result->data().size(), 0); | ||
1808 | } | 1809 | } | ||
1809 | 1810 | | |||
1811 | void shouldOnlyReturnTopLevelTasks() | ||||
1812 | { | ||||
1813 | // GIVEN | ||||
1814 | AkonadiFakeData data; | ||||
1815 | | ||||
1816 | // One collection | ||||
1817 | data.createCollection(GenCollection().withId(42).withRootAsParent().withTaskContent()); | ||||
1818 | | ||||
1819 | // One empty project | ||||
1820 | data.createItem(GenTodo().withId(1).asProject().withParent(42) | ||||
1821 | .withTitle(QStringLiteral("Empty Project")).withUid(QStringLiteral("project-1"))); | ||||
1822 | // One real project | ||||
1823 | data.createItem(GenTodo().withId(2).asProject().withParent(42) | ||||
1824 | .withTitle(QStringLiteral("Real Project")).withUid(QStringLiteral("project-2"))); | ||||
1825 | | ||||
1826 | // Two toplevel tasks in the second collection, one with a child | ||||
1827 | data.createItem(GenTodo().withId(3).withParent(42).withTitle(QStringLiteral("43")).withUid("parent-43").withParentUid("project-2")); | ||||
1828 | data.createItem(GenTodo().withId(4).withParent(42).withTitle(QStringLiteral("44")).withParentUid(QStringLiteral("2"))); // non-existing parent | ||||
1829 | data.createItem(GenTodo().withId(5).withParent(42).withTitle(QStringLiteral("45")).withParentUid(QStringLiteral("parent-43"))); // existing parent | ||||
1830 | | ||||
1831 | // WHEN | ||||
1832 | auto serializer = Akonadi::Serializer::Ptr(new Akonadi::Serializer); | ||||
1833 | auto cache = Akonadi::Cache::Ptr::create(serializer, Akonadi::MonitorInterface::Ptr(data.createMonitor())); | ||||
1834 | auto storage = createCachingStorage(data, cache); | ||||
1835 | QScopedPointer<Domain::TaskQueries> queries(new Akonadi::TaskQueries(storage, | ||||
1836 | serializer, | ||||
1837 | Akonadi::MonitorInterface::Ptr(data.createMonitor()), | ||||
1838 | cache)); | ||||
1839 | auto result = queries->findTopLevel(); | ||||
1840 | result->data(); | ||||
1841 | result = queries->findTopLevel(); // Should not cause any problem or wrong data | ||||
1842 | | ||||
1843 | // THEN | ||||
1844 | QVERIFY(result->data().isEmpty()); | ||||
1845 | TestHelpers::waitForEmptyJobQueue(); | ||||
1846 | | ||||
1847 | QCOMPARE(result->data().size(), 2); | ||||
1848 | QCOMPARE(result->data().at(0)->title(), QStringLiteral("43")); | ||||
1849 | QCOMPARE(result->data().at(1)->title(), QStringLiteral("44")); | ||||
1850 | } | ||||
1851 | | ||||
1810 | }; | 1852 | }; | ||
1811 | 1853 | | |||
1812 | ZANSHIN_TEST_MAIN(AkonadiTaskQueriesTest) | 1854 | ZANSHIN_TEST_MAIN(AkonadiTaskQueriesTest) | ||
1813 | 1855 | | |||
1814 | #include "akonaditaskqueriestest.moc" | 1856 | #include "akonaditaskqueriestest.moc" |