+ std::string anything;
+ ThreadEngine* te = NULL;
+
+ cout << "Creating new ThreadEngine class...\n";
+ try
+ {
+ ThreadEngineFactory* tef = new ThreadEngineFactory();
+ te = tef->Create(ServerInstance);
+ delete tef;
+ }
+ catch (...)
+ {
+ cout << "Creation failed, test failure.\n";
+ return false;
+ }
+ cout << "Creation success, type " << te->GetName() << "\n";
+
+ cout << "Allocate: new TestSuiteThread...\n";
+ TestSuiteThread* tst = new TestSuiteThread();
+
+ cout << "ThreadEngine::Create on TestSuiteThread...\n";
+ try
+ {
+ try
+ {
+ te->Create(tst);
+ }
+ catch (CoreException &ce)
+ {
+ cout << "Failure: " << ce.GetReason() << endl;
+ }
+ }
+ catch (...)
+ {
+ cout << "Failure, unhandled exception\n";
+ }
+
+ cout << "Type any line and press enter to end test.\n";
+ cin >> anything;
+
+ /* Thread engine auto frees thread on delete */
+ cout << "Waiting for thread to exit... " << flush;
+ delete tst;
+ cout << "Done!\n";
+
+ cout << "Delete ThreadEngine... ";
+ delete te;
+ cout << "Done!\n";
+