Commit a85f92c4 authored by Steven Murray's avatar Steven Murray
Browse files

Added isDisabled member-variable to cta::common::dataStructures::LogicalLibrary

parent efbf0cca
......@@ -167,6 +167,7 @@ set (COMMON_UNIT_TESTS_LIB_SRC_FILES
ConfigurationFileTests.cpp
SourcedParameterTests.cpp
dataStructures/ArchiveFileTest.cpp
dataStructures/LogicalLibraryTest.cpp
dataStructures/StorageClassTest.cpp
processCap/SmartCapTest.cpp
log/FileLoggerTest.cpp
......
......@@ -27,7 +27,8 @@ namespace dataStructures {
//------------------------------------------------------------------------------
// constructor
//------------------------------------------------------------------------------
LogicalLibrary::LogicalLibrary() {}
LogicalLibrary::LogicalLibrary(): isDisabled(false) {
}
//------------------------------------------------------------------------------
// operator==
......
......@@ -35,6 +35,11 @@ namespace dataStructures {
*/
struct LogicalLibrary {
/**
* Constructor.
*
* Initialises isDisabled to false.
*/
LogicalLibrary();
bool operator==(const LogicalLibrary &rhs) const;
......@@ -42,6 +47,7 @@ struct LogicalLibrary {
bool operator!=(const LogicalLibrary &rhs) const;
std::string name;
bool isDisabled;
EntryLog creationLog;
EntryLog lastModificationLog;
std::string comment;
......
/*
* The CERN Tape Archive (CTA) project
* Copyright (C) 2015 CERN
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "common/dataStructures/LogicalLibrary.hpp"
#include <gtest/gtest.h>
#include <algorithm>
namespace unitTests {
class cta_common_dataStructures_LogicalLibraryTest : public ::testing::Test {
protected:
virtual void SetUp() {
}
virtual void TearDown() {
}
};
TEST_F(cta_common_dataStructures_LogicalLibraryTest, constructor) {
using namespace cta::common::dataStructures;
LogicalLibrary logicalLibrary;
ASSERT_FALSE(logicalLibrary.isDisabled);
}
} // namespace unitTests
Supports Markdown
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