Skip to content

Commit

Permalink
Refs #9445. Removed using namespace from PoldiMockInstrumentHelpers.h
Browse files Browse the repository at this point in the history
Had to adjust two unit tests to use the namespaces instead.
  • Loading branch information
Michael Wedel committed Jun 26, 2014
1 parent 951f296 commit ec947a6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
Expand Up @@ -15,7 +15,6 @@
#include "MantidGeometry/Instrument/FitParameter.h"
#include "MantidKernel/Interpolation.h"

using namespace Mantid::Geometry;

using ::testing::Return;

Expand Down Expand Up @@ -114,26 +113,26 @@ class MockChopper : public PoldiAbstractChopper
}
};

class PoldiFakeSourceComponent : public ObjComponent
class PoldiFakeSourceComponent : public Geometry::ObjComponent
{
public:
PoldiFakeSourceComponent() :
ObjComponent("FakePoldiSource", 0) {}
};

class PoldiAbstractFakeInstrument : public Instrument
class PoldiAbstractFakeInstrument : public Geometry::Instrument
{
public:
PoldiAbstractFakeInstrument() {}

virtual boost::shared_ptr<const IComponent> getComponentByName(const std::string &cname, int nlevels = 0) const {
virtual boost::shared_ptr<const Geometry::IComponent> getComponentByName(const std::string &cname, int nlevels = 0) const {
UNUSED_ARG(cname);
UNUSED_ARG(nlevels);

return getComponentByNameFake();
}

virtual boost::shared_ptr<const IComponent> getComponentByNameFake() const = 0;
virtual boost::shared_ptr<const Geometry::IComponent> getComponentByNameFake() const = 0;
};

class PoldiValidSourceFakeInstrument : public PoldiAbstractFakeInstrument
Expand All @@ -142,9 +141,9 @@ class PoldiValidSourceFakeInstrument : public PoldiAbstractFakeInstrument
PoldiValidSourceFakeInstrument() :
PoldiAbstractFakeInstrument() {}

boost::shared_ptr<const IComponent> getComponentByNameFake() const
boost::shared_ptr<const Geometry::IComponent> getComponentByNameFake() const
{
return boost::shared_ptr<const IComponent>(new PoldiFakeSourceComponent);
return boost::shared_ptr<const Geometry::IComponent>(new PoldiFakeSourceComponent);
}
};

Expand All @@ -154,28 +153,28 @@ class PoldiInvalidSourceFakeInstrument : public PoldiAbstractFakeInstrument
PoldiInvalidSourceFakeInstrument() :
PoldiAbstractFakeInstrument() {}

boost::shared_ptr<const IComponent> getComponentByNameFake() const
boost::shared_ptr<const Geometry::IComponent> getComponentByNameFake() const
{
return boost::shared_ptr<const IComponent>();
return boost::shared_ptr<const Geometry::IComponent>();
}
};

class PoldiValidFakeParameterMap : public ParameterMap
class PoldiValidFakeParameterMap : public Geometry::ParameterMap
{
public:
PoldiValidFakeParameterMap(const IComponent *component) :
ParameterMap()
PoldiValidFakeParameterMap(const Geometry::IComponent *component) :
Geometry::ParameterMap()
{
add("fitting", component, "WavelengthDistribution", Mantid::Geometry::FitParameter());
}

};

class PoldiInvalidFakeParameterMap : public ParameterMap
class PoldiInvalidFakeParameterMap : public Geometry::ParameterMap
{
public:
PoldiInvalidFakeParameterMap() :
ParameterMap()
Geometry::ParameterMap()
{
}

Expand Down
1 change: 1 addition & 0 deletions Code/Mantid/Framework/SINQ/test/PoldiBasicChopperTest.h
Expand Up @@ -9,6 +9,7 @@
using namespace Mantid;
using namespace Mantid::API;
using namespace Mantid::Poldi;
using namespace Mantid::Geometry;

class TestablePoldiBasicChopper : public PoldiBasicChopper
{
Expand Down
1 change: 1 addition & 0 deletions Code/Mantid/Framework/SINQ/test/PoldiDetectorTest.h
Expand Up @@ -14,6 +14,7 @@ using namespace Mantid::API;
using namespace Mantid::Kernel;
using namespace Mantid::Poldi;
using namespace Mantid::DataObjects;
using namespace Mantid::Geometry;

class TestablePoldiHeliumDetector : public ConfiguredHeliumDetector
{
Expand Down

0 comments on commit ec947a6

Please sign in to comment.