| 136 | } |
| 137 | |
| 138 | void TestTestController::replaceSuite() |
| 139 | { |
| 140 | auto* suiteOne = new FakeTestSuite(TestSuiteName, m_project, QStringList() << TestCaseNameOne); |
| 141 | m_testController->addTestSuite(suiteOne); |
| 142 | |
| 143 | QCOMPARE(m_testController->findTestSuite(m_project, TestSuiteName)->name(), QString(TestSuiteName)); |
| 144 | QCOMPARE(m_testController->findTestSuite(m_project, TestSuiteName)->cases().size(), 1); |
| 145 | |
| 146 | auto* suiteTwo = new FakeTestSuite(TestSuiteName, m_project, QStringList() << TestCaseNameOne << TestCaseNameTwo); |
| 147 | m_testController->addTestSuite(suiteTwo); |
| 148 | |
| 149 | QCOMPARE(m_testController->testSuites().size(), 1); |
| 150 | QCOMPARE(m_testController->findTestSuite(m_project, TestSuiteName)->name(), QString(TestSuiteName)); |
| 151 | QCOMPARE(m_testController->findTestSuite(m_project, TestSuiteName)->cases().size(), 2); |
| 152 | |
| 153 | // TestController deletes the old suite when replacing it, so make sure we don't delete suiteOne manually |
| 154 | |
| 155 | m_testController->removeTestSuite(suiteTwo); |
| 156 | delete suiteTwo; |
| 157 | } |
| 158 | |
| 159 | void TestTestController::findByProject() |
| 160 | { |
nothing calls this directly
no test coverage detected