Translations:KDevelop5/Manual/Code generation with templates/78/da
Appearance
- testNameOfDriverChanged
void TestBus::testNameOfDriverChanged() { // create spy object QSignalSpy spy1(&m_bus, &Transportation::Bus::nameOfDriverChanged); // now change the name of driver m_bus.setNameOfDriver(QString("Jim")); // verify the check was made QVERIFY(m_bus.nameOfDriver() == QString("Jim")); // verify the signal was sent QCOMPARE(spy1.count(), 1); }