command
| 427 | |
| 428 | // command |
| 429 | void TestProjectController::fileInSubdirectory() |
| 430 | { |
| 431 | // verify that the project model contains a single file in a subfolder |
| 432 | // First setup a FakeFileManager with this folder + file |
| 433 | |
| 434 | m_projCtrl->openProject(m_projFilePath.toUrl()); |
| 435 | WAIT_FOR_OPEN_SIGNAL; |
| 436 | auto* proj = assertProjectOpened(m_projName); |
| 437 | |
| 438 | Path folderPath = Path(m_projFolder, QStringLiteral("foobar/")); |
| 439 | FakeFileManager* fileMng = createFileManager(); |
| 440 | fileMng->addSubFolderTo(m_projFolder, folderPath); |
| 441 | Path filePath = Path(folderPath, QStringLiteral("zoo")); |
| 442 | fileMng->addFileToFolder(folderPath, filePath); |
| 443 | |
| 444 | proj->setManagerPlugin(fileMng); |
| 445 | ProjectFolderItem* rootFolder = nullptr; |
| 446 | ProjectFolderItem* sub = nullptr; |
| 447 | ProjectFileItem* file = nullptr; |
| 448 | |
| 449 | proj->reloadModel(); |
| 450 | QTest::qWait(100); |
| 451 | |
| 452 | ASSERT_SINGLE_PROJECT_IN_MODEL(rootFolder); |
| 453 | ASSERT_SINGLE_SUBFOLDER_IN(rootFolder, "foobar", folderPath, sub); |
| 454 | ASSERT_SINGLE_FILE_IN(sub,"zoo",filePath,file); |
| 455 | |
| 456 | ASSERT_SINGLE_PROJECT_IN_MODEL(rootFolder); |
| 457 | ASSERT_SINGLE_SUBFOLDER_IN(rootFolder, "foobar", folderPath, sub); |
| 458 | ASSERT_SINGLE_FILE_IN(sub,"zoo",filePath,file); |
| 459 | } |
| 460 | |
| 461 | void TestProjectController::prettyFileName_data() |
| 462 | { |
nothing calls this directly
no test coverage detected