forked from npshub/mantid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MaskedPropertyTest.h
32 lines (28 loc) · 1.15 KB
/
MaskedPropertyTest.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
// NScD Oak Ridge National Laboratory, European Spallation Source,
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
// SPDX - License - Identifier: GPL - 3.0 +
#pragma once
#include "MantidKernel/MaskedProperty.h"
#include "MantidKernel/PropertyHistory.h"
#include <cxxtest/TestSuite.h>
using namespace Mantid::Kernel;
class MaskedPropertyTest : public CxxTest::TestSuite {
public:
void testMaskProperty() {
MaskedProperty<std::string> m_Property1("property1", "value");
TS_ASSERT(!m_Property1.name().compare("property1"));
TS_ASSERT(!m_Property1.value().compare("value"));
PropertyHistory prohist = m_Property1.createHistory();
TS_ASSERT(!prohist.value().compare("*****"));
}
void testMaskProperty1() {
MaskedProperty<std::string> m_Property2("property2", "");
TS_ASSERT(!m_Property2.name().compare("property2"));
TS_ASSERT(!m_Property2.value().compare(""));
PropertyHistory prohist = m_Property2.createHistory();
TS_ASSERT(!prohist.value().compare(""));
}
};