Jump to content

Translations:KDevelop5/Manual/Code generation with templates/78/en

From KDE Wiki Sandbox
Revision as of 08:38, 2 April 2020 by FuzzyBot (talk | contribs) (Importing a new version from external source)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
  • 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);
        
    }