Commit 4af4591b authored by Steven Murray's avatar Steven Murray
Browse files

Added unit-test createStorageClass_same_name_twice

parent d82fa379
......@@ -381,4 +381,18 @@ TEST_F(cta_catalogue_SqliteCatalogueTest, createStorageClass) {
ASSERT_EQ(creationLog, lastModificationLog);
}
TEST_F(cta_catalogue_SqliteCatalogueTest, createStorageClass_same_name_twice) {
using namespace cta;
catalogue::SqliteCatalogue catalogue;
const std::string storageClassName = "storage_class";
const uint64_t nbCopies = 2;
const std::string comment = "create storage class";
ASSERT_NO_THROW(catalogue.createStorageClass(m_cliSI,
storageClassName, nbCopies, comment));
ASSERT_THROW(catalogue.createStorageClass(m_cliSI,
storageClassName, nbCopies, comment), exception::Exception);
}
} // 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