| 279 | } |
| 280 | |
| 281 | void TestProjectController::openMultiple() |
| 282 | { |
| 283 | QString secondProj(QStringLiteral("bar")); |
| 284 | Path secondCfgUrl = writeProjectConfig(secondProj); |
| 285 | auto spy = createOpenedSpy(); |
| 286 | m_projCtrl->openProject(m_projFilePath.toUrl()); |
| 287 | WAIT_FOR_OPEN_SIGNAL; |
| 288 | m_projCtrl->openProject(secondCfgUrl.toUrl()); |
| 289 | WAIT_FOR_OPEN_SIGNAL; |
| 290 | |
| 291 | QCOMPARE(m_projCtrl->projectCount(), 2); |
| 292 | auto* proj1 = assertProjectOpened(m_projName); |
| 293 | auto* proj2 = assertProjectOpened(secondProj); |
| 294 | |
| 295 | QVERIFY(m_projCtrl->isProjectNameUsed(m_projName)); |
| 296 | QVERIFY(m_projCtrl->isProjectNameUsed(QStringLiteral("bar"))); |
| 297 | |
| 298 | QCOMPARE(spy->size(), 2); |
| 299 | auto* emittedProj1 = (*spy)[0][0].value<IProject*>(); |
| 300 | auto* emittedProj2 = (*spy)[1][0].value<IProject*>(); |
| 301 | QCOMPARE(emittedProj1, proj1); |
| 302 | QCOMPARE(emittedProj2, proj2); |
| 303 | |
| 304 | m_tmpConfigs << secondCfgUrl; |
| 305 | } |
| 306 | |
| 307 | /*! Verify that the projectmodel contains a single project. Put this project's |
| 308 | * ProjectFolderItem in the output parameter @p RootItem */ |
nothing calls this directly
no test coverage detected