#include <iostream>
#include <string>
#include "TestClassComplete_Stub.hpp"
+#include "CallBack.hpp"
using namespace std;
cout << "Return value: " << tcStub->getDouble(12345.678) << endl;
cout << "Return value: " << tcStub->getBoolean(true) << endl;
cout << "Return value: " << tcStub->getChar('c') << endl;
- cout << "==== ARRAY ====" << endl;
+/* cout << "==== ARRAY ====" << endl;
vector<char> in1;
in1.push_back(68);
in1.push_back(69);
cout << "Name: " << st.name << endl;
cout << "Value:" << st.value << endl;
cout << "Year" << st.year << endl;
- }
+ }*/
+ cout << "==== CALLBACK ====" << endl;
+ CallBackInterface *cbSingle = new CallBack(2354);
+ tcStub->registerCallback(cbSingle);
+ cout << "Return value from callback: " << tcStub->callBack() << endl;
+ CallBackInterface *cb1 = new CallBack(23);
+ CallBackInterface *cb2 = new CallBack(33);
+ CallBackInterface *cb3 = new CallBack(43);
+ vector<CallBackInterface*> cb;
+ cb.push_back(cb1);
+ cb.push_back(cb2);
+ cb.push_back(cb3);
+ tcStub->registerCallbackArray(cb);
+ cout << "Return value from callback: " << tcStub->callBack() << endl;
+ CallBackInterface *cb4 = new CallBack(23);
+ CallBackInterface *cb5 = new CallBack(33);
+ CallBackInterface *cb6 = new CallBack(43);
+ vector<CallBackInterface*> cblist;
+ cblist.push_back(cb4);
+ cblist.push_back(cb5);
+ cblist.push_back(cb6);
+ tcStub->registerCallbackList(cblist);
+ cout << "Return value from callback: " << tcStub->callBack() << endl;
cout << "==== OTHERS ====" << endl;
cout << "Return value: " << tcStub->getA() << endl;