3 #include "subjectimpl.h" 4 #include "observerimpl.h" 19 void testCaseObserversSignals();
20 void testCaseObserversSignals_data();
24 TestObserverSubjectTest::TestObserverSubjectTest()
28 void TestObserverSubjectTest::testCaseObserversSignals()
34 QVERIFY2(sub->getObservers().size() == 1,
"Num is not 1");
36 emit sub->notifyObservers(*data);
37 QVERIFY2(spy.count() == 1,
"More Than one Signal");
38 QList<QVariant> vars = spy.takeFirst();
39 QVERIFY2(vars.size() != 0,
"Size Error");
40 QVERIFY2(!vars.at(0).isNull(),
"Object Error");
44 void TestObserverSubjectTest::testCaseObserversSignals_data()
46 QTest::addColumn<ObservableData*>(
"data");
47 QTest::addColumn<ObserverImpl*>(
"obs");
48 QTest::addColumn<SubjectImpl*>(
"sub");
55 #include "tst_testobserversubjecttest.moc"