Public Member Functions | |
DocConversionTestSuite () | |
Private Member Functions | |
void | testBrokerRemoteServer () |
void | testGetCounter () |
void | testIncreaseCounter () |
void | testDecreaseCounter () |
void | testGetDocumentUrl () |
void | testGetDocumentFile () |
void | testGetDocumentConversion () |
void | testGetDocumentConLocation () |
void | testGetDocumentFileLocation () |
void | testConvertDocument () |
void | testServerRequestConversion () |
void | testListConversionDB () |
void | testServerRepresentationTypeQuery () |
void | testServerFeatureTypeQuery () |
|
Definition at line 376 of file docConversionTest.cpp. References main(), testBrokerRemoteServer(), testConvertDocument(), testDecreaseCounter(), testGetCounter(), testGetDocumentConLocation(), testGetDocumentConversion(), testGetDocumentFile(), testGetDocumentFileLocation(), testGetDocumentUrl(), testIncreaseCounter(), testListConversionDB(), testServerFeatureTypeQuery(), testServerRepresentationTypeQuery(), and testServerRequestConversion().
00376 : suite("DocConversionTestSuite") 00377 { 00378 add 00379 ( "BrokerRemoteServer", 00380 testcase( this, "testBrokerRemoteServer", 00381 &DocConversionTestSuite::testBrokerRemoteServer ) 00382 ); 00383 add 00384 ( "BrokerListConversionDB", 00385 testcase( this, "testListConversionDB", 00386 &DocConversionTestSuite::testListConversionDB ) 00387 ); 00388 add 00389 ( "DocumentGetDocumentConLocation", 00390 testcase( this, "testGetDocumentConLocation", 00391 00392 &DocConversionTestSuite::testGetDocumentConLocation ) ); 00393 add 00394 ( "BrokerDecreaseCounter", 00395 testcase( this, "testDecreaseCounter", 00396 &DocConversionTestSuite::testDecreaseCounter ) 00397 ); 00398 add 00399 ( "BrokerIncreaseCounter", 00400 testcase( this, "testIncreaseCounter", 00401 &DocConversionTestSuite::testIncreaseCounter ) 00402 ); 00403 add 00404 ( "BrokerGetCounter", 00405 testcase( this, "testGetCounter", 00406 &DocConversionTestSuite::testGetCounter ) 00407 ); 00408 add 00409 ( "DocumentGetDocumentUrl", 00410 testcase( this, "testGetDocumentUrl", 00411 &DocConversionTestSuite::testGetDocumentUrl ) 00412 ); 00413 add 00414 ( "DocumentGetDocumentFile", 00415 testcase( this, "testGetDocumentFile", 00416 &DocConversionTestSuite::testGetDocumentFile ) 00417 ); 00418 add 00419 ( "DocumentGetDocumentConversion", 00420 testcase( this, "testGetDocumentConversion", 00421 &DocConversionTestSuite::testGetDocumentConversion 00422 ) ); 00423 add 00424 ( "DocumentGetDocumentFileLocation", 00425 testcase( this, "testGetDocumentFileLocation", 00426 00427 &DocConversionTestSuite::testGetDocumentFileLocation ) ); 00428 add 00429 ( "DocumentConvertDocument", 00430 testcase( this, "testConvertDocument", 00431 &DocConversionTestSuite::testConvertDocument ) 00432 ); 00433 add 00434 ( "ServerRequestConversion", 00435 testcase( this, "testServerRequestConversion", 00436 &DocConversionTestSuite::testServerRequestConversion ) ); 00437 add 00438 ( "ServerRequestRepresentationTypeQuery", 00439 testcase( this, "testServerRepresentationTypeQuery", 00440 &DocConversionTestSuite::testServerRepresentationTypeQuery ) ); 00441 add 00442 ( "ServerRequestFeatureTypeQuery", 00443 testcase( this, "testServerFeatureTypeQuery", 00444 &DocConversionTestSuite::testServerFeatureTypeQuery ) ); 00445 suite::main().add("DocConversionTestSuite",this); 00446 } |
Here is the call graph for this function:
|
Definition at line 46 of file docConversionTest.cpp. References Broker::getServerName(). Referenced by DocConversionTestSuite().
00047 { 00048 Broker myBroker( "my.conversion.server" ); 00049 string myServerName = myBroker.getServerName(); 00050 if ( myServerName == "my.conversion.server" ) 00051 { 00052 assert_true( "broker remote server check", true ); 00053 } 00054 else 00055 { 00056 assert_true( "broker remote server check", false ); 00057 } 00058 } |
Here is the call graph for this function:
|
Definition at line 254 of file docConversionTest.cpp. References Broker::convertDocument(). Referenced by DocConversionTestSuite().
00255 { 00256 Broker myBroker; 00257 Document 00258 myDocument("http://infolab.uvt.nl/people/erics/papers/tech-clearinghouse/tech_clearinghouse.pdf", "pdf2ps"); 00259 if ( myBroker.convertDocument(myDocument) ) 00260 { 00261 assert_true( "Conversion results", true ); 00262 } 00263 else 00264 { 00265 assert_true( "Conversion results", false ); 00266 } 00267 } |
Here is the call graph for this function:
|
Definition at line 98 of file docConversionTest.cpp. References Broker::getCounter(). Referenced by DocConversionTestSuite().
00099 { 00100 { 00101 Broker myBroker; 00102 Broker anotherBroker; 00103 int mycounter = anotherBroker.getCounter(); 00104 assert_eq("pre decrease counter check", 2, mycounter ); 00105 } 00106 Broker yetAnotherBroker; 00107 int yetanothercounter = yetAnotherBroker.getCounter(); 00108 assert_eq("decreased counter check", 1, yetanothercounter ); 00109 } |
Here is the call graph for this function:
|
Definition at line 68 of file docConversionTest.cpp. References Broker::getCounter(). Referenced by DocConversionTestSuite().
00069 { 00070 Broker myBroker; 00071 assert_eq("broker counter check", 1, myBroker.getCounter() ); 00072 } |
Here is the call graph for this function:
|
Definition at line 199 of file docConversionTest.cpp. References Document::getConversionLocation(), and Document::setConversionLocation(). Referenced by DocConversionTestSuite().
00200 { 00201 Document 00202 myDocument("http://infolab.uvt.nl/people/erics/papers/tech-clearinghouse/tech_clearinghouse.pdf", "pdf2ps"); 00203 myDocument.setConversionLocation("http://localhost/conversions"); 00204 string loc = myDocument.getConversionLocation(); 00205 int match; // to check matching strings. 00206 if ( loc == "http://localhost/conversions" ) 00207 { 00208 match = 0; 00209 } 00210 else 00211 { 00212 match = 1; 00213 } 00214 assert_eq("get Document conversion location check", 0, match); 00215 } |
Here is the call graph for this function:
|
Definition at line 172 of file docConversionTest.cpp. References Document::getDocumentConversion(). Referenced by DocConversionTestSuite().
00173 { 00174 Document 00175 myDocument("http://infolab.uvt.nl/people/erics/papers/tech-clearinghouse/tech_clearinghouse.pdf", "pdf2ps"); 00176 string myConversion = myDocument.getDocumentConversion(); 00177 int match; // to check matching strings. 00178 if ( myConversion == "pdf2ps" ) 00179 { 00180 match = 0; 00181 } 00182 else 00183 { 00184 match = 1; 00185 } 00186 assert_eq("get Document conversion check", 0, match); 00187 } |
Here is the call graph for this function:
|
Definition at line 146 of file docConversionTest.cpp. References Document::getDocumentFile(). Referenced by DocConversionTestSuite().
00147 { 00148 Document 00149 myDocument("http://infolab.uvt.nl/people/erics/papers/tech-clearinghouse/tech_clearinghouse.pdf", "pdf2ps"); 00150 string myFile = myDocument.getDocumentFile(); 00151 int match; // to check matching strings. 00152 if ( myFile == "tech_clearinghouse.pdf" ) 00153 { 00154 match = 0; 00155 } 00156 else 00157 { 00158 match = 1; 00159 } 00160 assert_eq("get Document file check", 0, match); 00161 } |
Here is the call graph for this function:
|
Definition at line 227 of file docConversionTest.cpp. References Document::getFileLocation(), and Document::setFileLocation(). Referenced by DocConversionTestSuite().
00228 { 00229 Document 00230 myDocument("http://infolab.uvt.nl/people/erics/papers/tech-clearinghouse/tech_clearinghouse.pdf", "pdf2ps"); 00231 myDocument.setFileLocation("/tmp"); 00232 string myFileLocation = myDocument.getFileLocation(); 00233 int match; // to check matching strings. 00234 if ( myFileLocation == "/tmp" ) 00235 { 00236 match = 0; 00237 } 00238 else 00239 { 00240 match = 1; 00241 } 00242 assert_eq("get Document file location check", 0, match); 00243 } |
Here is the call graph for this function:
|
Definition at line 120 of file docConversionTest.cpp. References Document::getDocumentUrl(). Referenced by DocConversionTestSuite().
00121 { 00122 Document 00123 myDocument("http://infolab.uvt.nl/people/erics/papers/tech-clearinghouse/tech_clearinghouse.pdf", "pdf2ps"); 00124 string myUrl = myDocument.getDocumentUrl(); 00125 int match; // to check matching strings. 00126 if ( myUrl == "http://infolab.uvt.nl/people/erics/papers/tech-clearinghouse/tech_clearinghouse .pdf" ) 00127 { 00128 match = 0; 00129 } 00130 else 00131 { 00132 match = 1; 00133 } 00134 assert_eq("get Document url check", 0, match); 00135 } |
Here is the call graph for this function:
|
Definition at line 82 of file docConversionTest.cpp. References Broker::getCounter(). Referenced by DocConversionTestSuite().
00083 { 00084 Broker myBroker; 00085 assert_eq("initial counter check", 1, myBroker.getCounter() ); 00086 Broker anotherBroker; 00087 assert_eq("increase counter check", 2, anotherBroker.getCounter() ); 00088 } |
Here is the call graph for this function:
|
Definition at line 302 of file docConversionTest.cpp. References Broker::getConversionListing(). Referenced by DocConversionTestSuite().
00303 { 00304 Broker myBroker; 00305 Result myDBQuery = myBroker.getConversionListing(); 00306 if ( myDBQuery.size() > 0 ) 00307 { 00308 assert_true( "list conversions check", true ); 00309 } 00310 else 00311 { 00312 assert_true( "list conversions check", false ); 00313 } 00314 } |
Here is the call graph for this function:
|
Definition at line 357 of file docConversionTest.cpp. References Broker::getFeatureTypeListing(). Referenced by DocConversionTestSuite().
00358 { 00359 Broker myBroker; 00360 string featureTypeTester = "binary"; 00361 00362 Result myFeatureQuery = 00363 myBroker.getFeatureTypeListing( featureTypeTester ); 00364 if ( myFeatureQuery.size() > 0 ) 00365 { 00366 assert_true( "feature types listing", true ); 00367 } 00368 else 00369 { 00370 assert_true( "feature types listing", false ); 00371 } 00372 } |
Here is the call graph for this function:
|
Definition at line 328 of file docConversionTest.cpp. References Broker::getRepresentationTypeListing(). Referenced by DocConversionTestSuite().
00329 { 00330 Broker myBroker; 00331 string representationTypeTester = "pdf"; 00332 00333 Result myRepresentationQuery = 00334 myBroker.getRepresentationTypeListing( representationTypeTester ); 00335 if ( myRepresentationQuery.size() > 0 ) 00336 { 00337 assert_true( "representation types listing", true ); 00338 } 00339 else 00340 { 00341 assert_true( "representation types listing", false ); 00342 } 00343 } |
Here is the call graph for this function:
|
Definition at line 278 of file docConversionTest.cpp. References Server::requestConversion(). Referenced by DocConversionTestSuite().
00279 { 00280 Server myServer; 00281 Document 00282 myDocument("http://infolab.uvt.nl/people/erics/papers/tech-clearinghouse/tech_clearinghouse.pdf", "pdf2ps"); 00283 if ( myServer.requestConversion( myDocument ) ) 00284 { 00285 assert_true( "server request conversion check", true ); 00286 } 00287 else 00288 { 00289 assert_true( "server request conversion check", false ); 00290 } 00291 } |
Here is the call graph for this function: