// register_catalog_web_pages_t.cxx #include "dial_webcat/register_catalog_web_pages.h" #include #include #include "dial_ws/DialWs.h" using std::string; using std::cout; using std::endl; using dial::DialWs; void msg(string txt) { cout << "--- "; cout << txt; cout << " ---" << endl; } int register_catalog_web_pages_t() { assert( ! DialWs::has_web_page("application_repository") ); msg("Register pages"); assert( dial::register_catalog_web_pages() == 0 ); msg("Retrieve application repository"); Text wp = DialWs::web_page("application_repository"); cout << wp << endl; assert( wp.size() ); assert( DialWs::has_web_page("application_repository") ); msg("Retrieve application selection"); wp = DialWs::web_page("application_selection"); cout << wp << endl; assert( wp.size() ); assert( DialWs::has_web_page("application_selection") ); return 0; } #ifdef CTEST_MAIN int main() { return register_catalog_web_pages_t(); } #endif