00001 /* 00002 * testTableDataSourceImageDir.h 00003 * 00004 * Created on: 6-aug-2009 00005 * Author: dodijk 00006 */ 00007 #ifndef testTableDataSourceImageDir_h 00008 #define testTableDataSourceImageDir_h 00009 00010 #define BOOST_TEST_MODULE MediaTableTestSuite 00011 #include "boost/test/unit_test.hpp" 00012 00013 #include "testTableDataSource.h" 00014 00015 #include "../TableDataSourceImageDir.h" 00016 00017 typedef Impala::Application::MediaTable::TableDataSource TableDataSource; 00018 typedef Impala::Application::MediaTable::TableDataSourceImageDir TableDataSourceImageDir; 00019 00020 BOOST_AUTO_TEST_SUITE( TableDataSourceImageDirTests ) 00021 00022 BOOST_AUTO_TEST_CASE (TableDataSourceImageDirTest) { 00023 Impala::CmdOptions& options = Impala::CmdOptions::GetInstance(); 00024 if(options.GetString("directory") == "") { 00025 BOOST_TEST_MESSAGE("Test case TableDataSourceImageDirTest is skipped because no directory is given."); 00026 return; 00027 } 00028 00029 TableDataSource* imgsrc = new TableDataSourceImageDir(options.GetString("directory")); 00030 BOOST_REQUIRE(imgsrc); 00031 00032 BOOST_CHECK_GT(imgsrc->GetTotalRows(), 0); 00033 00034 TableDataSourceTests::IsValidTableDataSourceTest(imgsrc); 00035 00036 // TODO: Test ImageDir specific stuff. 00037 } 00038 00039 BOOST_AUTO_TEST_SUITE_END() 00040 00041 #endif // testTableDataSourceImageDir_h