Commit 5ac8a9c7 authored by Srikanth Ravipati's avatar Srikanth Ravipati Committed by Peterson, Peter
Browse files

Set and unset facilities

parent 4d65b4c2
......@@ -155,6 +155,8 @@ public:
void testMakeFileNameForISIS() {
// Set the facility
ConfigService::Instance().setString("default.facility", "ISIS");
const FacilityInfo &facility =
ConfigService::Instance().getFacility("ISIS");
const InstrumentInfo &instrument = facility.instrument("HRPD");
......@@ -184,10 +186,15 @@ public:
TS_ASSERT_EQUALS("EFG2H00000123", FileFinder::Instance().makeFileName(
"EFG2H123", instrument));
ConfigService::Instance().setString("default.facility", "NONE");
}
void testMakeFileNameForSNS() {
// Set the facility
ConfigService::Instance().setString("default.facility", "SNS");
const FacilityInfo &facility = ConfigService::Instance().getFacility("SNS");
const InstrumentInfo &instrument = facility.instrument("CNCS");
......@@ -212,6 +219,9 @@ public:
// Test for REF_L (to check that the extra _ doesn't upset anything)
TS_ASSERT_EQUALS("REF_L_666", FileFinder::Instance().makeFileName(
"REF_L666", instrument));
ConfigService::Instance().setString("default.facility", "NONE");
}
void testGetInstrument() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment