#include #include #include #include "store.h" #include "test.h" #include "log.h" using namespace Sink; /** * Test of the test account. */ class TestAccountTest : public QObject { Q_OBJECT private slots: void initTestCase() { Test::initTest(); } void testLoad() { auto &&account = Test::TestAccount::registerAccount(); auto folder = ApplicationDomain::Folder::Ptr::create(ApplicationDomain::ApplicationDomainType::createEntity()); account.addEntity(folder); auto folders = account.entities(); QCOMPARE(folders.size(), 1); QCOMPARE(account.entities().size(), 0); auto mail = ApplicationDomain::ApplicationDomainType::createEntity(); Sink::Store::create(ApplicationDomain::Mail(account.identifier)).exec(); QCOMPARE(account.entities().size(), 1); } }; QTEST_MAIN(TestAccountTest) #include "testaccounttest.moc"