Newer
Older
Roman Tolchenov
committed
#ifndef ISISDATAARCHIVETEST_H_
#define ISISDATAARCHIVETEST_H_
#include <fstream>
#include <cxxtest/TestSuite.h>
#include "MantidDataHandling/ISISDataArchive.h"
#include "MantidAPI/ArchiveSearchFactory.h"
using namespace Mantid::DataHandling;
using namespace Mantid::API;
class ISISDataArchiveTest : public CxxTest::TestSuite
{
public:
Campbell, Stuart
committed
void xtestSearch()
Roman Tolchenov
committed
{
ISISDataArchive arch;
std::set<std::string> filename;
filename.insert("hrpd273");
std::vector<std::string> extension = std::vector<std::string>(1,"");
std::string path = arch.getArchivePath(filename, extension);
std::cout << "(hrpd273)= " << path << std::endl;
Roman Tolchenov
committed
TS_ASSERT_EQUALS(path.substr(path.size()-18,10),"cycle_98_0");
filename.clear();
filename.insert("hrpds70");
path = arch.getArchivePath(filename, extension);
Roman Tolchenov
committed
TS_ASSERT(path.empty());
}
Campbell, Stuart
committed
void testFactory()
Roman Tolchenov
committed
{
Campbell, Stuart
committed
boost::shared_ptr<IArchiveSearch> arch = ArchiveSearchFactory::Instance().create("ISISDataSearch");
Roman Tolchenov
committed
TS_ASSERT(arch);
}
};
#endif /*ISISDATAARCHIVETEST_H_*/