diff options
-rw-r--r-- | slicer/db/testInsert.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/slicer/db/testInsert.cpp b/slicer/db/testInsert.cpp index fcea462..6f01d76 100644 --- a/slicer/db/testInsert.cpp +++ b/slicer/db/testInsert.cpp @@ -7,6 +7,7 @@ #include "sqlInsertSerializer.h" #include "sqlSelectDeserializer.h" #include <types.h> +#include "exceptions.h" BOOST_TEST_DONT_PRINT_LOG_VALUE(TestModule::DateTime); BOOST_TEST_DONT_PRINT_LOG_VALUE(TestModule::IsoDate); @@ -79,3 +80,10 @@ BOOST_AUTO_TEST_CASE( insert_converted ) BOOST_REQUIRE_EQUAL(st->ts, st2->ts); } +BOOST_AUTO_TEST_CASE( insert_unsupportedModel ) +{ + auto db = DBPtr(DB::MockDatabase::openConnectionTo("pqmock")); + TestModule::ClassMap cm; + BOOST_REQUIRE_THROW(Slicer::SerializeAny<Slicer::SqlInsertSerializer>(cm, db.get(), "converted"), Slicer::UnsupportedModelType); +} + |