From 2284a4f085b7ffed2e6c9e001eedeeb5e2d521fa Mon Sep 17 00:00:00 2001 From: florian <f.spreckelsen@inidscale.com> Date: Mon, 2 Aug 2021 15:15:59 +0200 Subject: [PATCH] TST: Add Test for warnings --- test/test_transaction.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/test_transaction.cpp b/test/test_transaction.cpp index 75a96ea..e2d19e9 100644 --- a/test/test_transaction.cpp +++ b/test/test_transaction.cpp @@ -116,6 +116,10 @@ TEST(test_transaction, insert_delete) { const auto &new_entity = insert_result_set.GetEntity(); EXPECT_FALSE(new_entity.GetId().empty()); EXPECT_FALSE(new_entity.HasErrors()); + // Should have a warning since it has no properties + EXPECT_TRUE(new_entity.HasWarnings()); + EXPECT_EQ(new_entity.GetWarnings().Size(), 1); + EXPECT_EQ(new_entity.GetWarnings().At(0).GetCode(), MessageCode::ENTITY_HAS_NO_PROPERTIES); auto delete_transaction(connection->CreateTransaction()); -- GitLab