Changeset View
Changeset View
Standalone View
Standalone View
tests/units/testlib/akonadifakedataxmlloadertest.cpp
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Line(s) | 34 | { | |||
---|---|---|---|---|---|
44 | auto loader = Testlib::AkonadiFakeDataXmlLoader(&data); | 44 | auto loader = Testlib::AkonadiFakeDataXmlLoader(&data); | ||
45 | 45 | | |||
46 | // WHEN | 46 | // WHEN | ||
47 | loader.load(SOURCE_DIR "/../akonadi/testenv/data/testdata.xml"); | 47 | loader.load(SOURCE_DIR "/../akonadi/testenv/data/testdata.xml"); | ||
48 | 48 | | |||
49 | // THEN | 49 | // THEN | ||
50 | QVERIFY(data.collections().size() > 1); | 50 | QVERIFY(data.collections().size() > 1); | ||
51 | QVERIFY(data.items().size() > 1); | 51 | QVERIFY(data.items().size() > 1); | ||
52 | QVERIFY(data.tags().size() > 1); | 52 | QVERIFY(data.contexts().size() > 1); | ||
53 | 53 | | |||
54 | // Do a bit of sanity checking, no need to do much more than that as | 54 | // Do a bit of sanity checking, no need to do much more than that as | ||
55 | // the xml loading will be extensively used in the AkonadiFakeStorageTest | 55 | // the xml loading will be extensively used in the AkonadiFakeStorageTest | ||
56 | // and AkonadiFakeData has quite a few asserts. | 56 | // and AkonadiFakeData has quite a few asserts. | ||
57 | 57 | | |||
58 | QCOMPARE(data.childCollections(Akonadi::Collection::root().id()).size(), 2); | 58 | QCOMPARE(data.childCollections(Akonadi::Collection::root().id()).size(), 2); | ||
59 | const auto res = data.childCollections(Akonadi::Collection::root().id()).at(1); | 59 | const auto res = data.childCollections(Akonadi::Collection::root().id()).at(1); | ||
60 | QCOMPARE(res.id(), qint64(2)); | 60 | QCOMPARE(res.id(), qint64(2)); | ||
Show All 24 Lines |