Changeset View
Changeset View
Standalone View
Standalone View
tests/units/presentation/workdaypagemodeltest.cpp
Show First 20 Lines • Show All 166 Lines • ▼ Show 20 Line(s) | 48 | { | |||
---|---|---|---|---|---|
167 | QCOMPARE(model->data(childTask11Index, Qt::CheckStateRole).toBool(), childTask11->isDone()); | 167 | QCOMPARE(model->data(childTask11Index, Qt::CheckStateRole).toBool(), childTask11->isDone()); | ||
168 | QCOMPARE(model->data(childTask12Index, Qt::CheckStateRole).toBool(), childTask12->isDone()); | 168 | QCOMPARE(model->data(childTask12Index, Qt::CheckStateRole).toBool(), childTask12->isDone()); | ||
169 | QCOMPARE(model->data(task2Index, Qt::CheckStateRole).toBool(), task2->isDone()); | 169 | QCOMPARE(model->data(task2Index, Qt::CheckStateRole).toBool(), task2->isDone()); | ||
170 | QCOMPARE(model->data(task3Index, Qt::CheckStateRole).toBool(), task3->isDone()); | 170 | QCOMPARE(model->data(task3Index, Qt::CheckStateRole).toBool(), task3->isDone()); | ||
171 | QCOMPARE(model->data(taskChildTask12Index, Qt::CheckStateRole).toBool(), childTask12->isDone()); | 171 | QCOMPARE(model->data(taskChildTask12Index, Qt::CheckStateRole).toBool(), childTask12->isDone()); | ||
172 | 172 | | |||
173 | QCOMPARE(model->data(task1Index, Presentation::QueryTreeModelBase::AdditionalInfoRole).toString(), QString("Inbox")); | 173 | QCOMPARE(model->data(task1Index, Presentation::QueryTreeModelBase::AdditionalInfoRole).toString(), QString("Inbox")); | ||
174 | QCOMPARE(model->data(task2Index, Presentation::QueryTreeModelBase::AdditionalInfoRole).toString(), QString("Project: KDE")); | 174 | QCOMPARE(model->data(task2Index, Presentation::QueryTreeModelBase::AdditionalInfoRole).toString(), QString("Project: KDE")); | ||
175 | QCOMPARE(model->data(childTask11Index, Presentation::QueryTreeModelBase::AdditionalInfoRole).toString(), QString()); | ||||
176 | QCOMPARE(model->data(childTask12Index, Presentation::QueryTreeModelBase::AdditionalInfoRole).toString(), QString()); | ||||
175 | 177 | | |||
176 | // WHEN | 178 | // WHEN | ||
177 | taskRepositoryMock(&Domain::TaskRepository::update).when(task1).thenReturn(new FakeJob(this)); | 179 | taskRepositoryMock(&Domain::TaskRepository::update).when(task1).thenReturn(new FakeJob(this)); | ||
178 | taskRepositoryMock(&Domain::TaskRepository::update).when(childTask11).thenReturn(new FakeJob(this)); | 180 | taskRepositoryMock(&Domain::TaskRepository::update).when(childTask11).thenReturn(new FakeJob(this)); | ||
179 | taskRepositoryMock(&Domain::TaskRepository::update).when(childTask12).thenReturn(new FakeJob(this)); | 181 | taskRepositoryMock(&Domain::TaskRepository::update).when(childTask12).thenReturn(new FakeJob(this)); | ||
180 | taskRepositoryMock(&Domain::TaskRepository::update).when(task2).thenReturn(new FakeJob(this)); | 182 | taskRepositoryMock(&Domain::TaskRepository::update).when(task2).thenReturn(new FakeJob(this)); | ||
181 | taskRepositoryMock(&Domain::TaskRepository::update).when(task3).thenReturn(new FakeJob(this)); | 183 | taskRepositoryMock(&Domain::TaskRepository::update).when(task3).thenReturn(new FakeJob(this)); | ||
182 | 184 | | |||
▲ Show 20 Lines • Show All 216 Lines • Show Last 20 Lines |