diff --git a/Code/Mantid/Framework/Kernel/test/MultiFileNameParserTest.h b/Code/Mantid/Framework/Kernel/test/MultiFileNameParserTest.h index 9f4f262f1195e0e4205b22c4b99248672e4cdf47..dfd28d4cba749a4a6676ea8061fd24cdd0c3d781 100644 --- a/Code/Mantid/Framework/Kernel/test/MultiFileNameParserTest.h +++ b/Code/Mantid/Framework/Kernel/test/MultiFileNameParserTest.h @@ -14,6 +14,9 @@ using namespace Mantid::Kernel::MultiFileNameParsing; class MultiFileNameParserTest : public CxxTest::TestSuite { public: + static MultiFileNameParserTest *createSuite() { return new MultiFileNameParserTest(); } + static void destroySuite(MultiFileNameParserTest *suite) { delete suite; } + typedef std::vector<std::vector<unsigned int> > ParsedRuns; ///////////////////////////////////////////////////////////////////////////// @@ -325,19 +328,6 @@ public: TS_ASSERT_EQUALS(filenames[2][0], "c:/TSC00004.raw"); } - void test_instrument_with_multiple_padding() - { - Parser parser; - parser.parse("TESTHISTOLISTENER123,299-301"); - - std::vector<std::vector<std::string> > filenames = parser.fileNames(); - - TS_ASSERT_EQUALS(filenames[0][0], "TESTHISTOLISTENER00000123" ); - TS_ASSERT_EQUALS(filenames[1][0], "TESTHISTOLISTENER00000299" ); - TS_ASSERT_EQUALS(filenames[1][1], "TST00000000300" ); - TS_ASSERT_EQUALS(filenames[1][2], "TST00000000301" ); - } - void test_complexFileNameString_SNS() { Parser parser; @@ -371,6 +361,21 @@ public: TS_ASSERT_EQUALS(filenames[7][2], "CNCS_52.nxs"); } + void test_instrument_with_multiple_padding() + { + Mantid::Kernel::ConfigService::Instance().setString("supported.facilities", "TEST"); + + Parser parser; + parser.parse("TESTHISTOLISTENER123,299-301"); + + std::vector<std::vector<std::string> > filenames = parser.fileNames(); + + TS_ASSERT_EQUALS(filenames[0][0], "TESTHISTOLISTENER00000123" ); + TS_ASSERT_EQUALS(filenames[1][0], "TESTHISTOLISTENER00000299" ); + TS_ASSERT_EQUALS(filenames[1][1], "TST00000000300" ); + TS_ASSERT_EQUALS(filenames[1][2], "TST00000000301" ); + } + }; -#endif /* MANTID_KERNEL_MULTIFILENAMEPARSERTEST_H_ */ \ No newline at end of file +#endif /* MANTID_KERNEL_MULTIFILENAMEPARSERTEST_H_ */ diff --git a/Code/Mantid/instrument/Facilities.xml b/Code/Mantid/instrument/Facilities.xml index 3125b7b45a30691c6c9ee81a6e7e894b9c0e60ca..8d1657e251636df60b48ab14a4278331fa758a0c 100644 --- a/Code/Mantid/instrument/Facilities.xml +++ b/Code/Mantid/instrument/Facilities.xml @@ -206,13 +206,6 @@ <livedata listener="ISISHistoDataListener"/> - <instrument name="TESTHISTOLISTENER"> - <zeropadding size="8"/> - <zeropadding size="11" startRunNumber="300" prefix="TST"/> - <technique>Test ISISHistoDataListener</technique> - <livedata address="127.0.0.1:6789" /> - </instrument> - </facility> <facility name="HFIR" FileExtensions=".nxs,.dat,.xml"> @@ -488,6 +481,14 @@ <technique>Test Neutron Diffraction</technique> <livedata address="127.0.0.1:0" /> </instrument> + + <instrument name="TESTHISTOLISTENER"> + <zeropadding size="8"/> + <zeropadding size="11" startRunNumber="300" prefix="TST"/> + <technique>Test ISISHistoDataListener</technique> + <livedata listener="ISISHistoDataListener" address="127.0.0.1:6789" /> + </instrument> + </facility> </facilities>