Skip to content
Snippets Groups Projects

TST: Add Tests for insert and delete

Merged Florian Spreckelsen requested to merge f-insert into dev
All threads resolved!
1 file
+ 24
0
Compare changes
  • Side-by-side
  • Inline
+ 24
0
@@ -139,4 +139,28 @@ TEST(test_transaction, insert_delete) {
EXPECT_FALSE(deleted_entity.HasErrors());
}
// TODO(fspreck) Insert an RT and a Record of this type, check
// whether this is reflected correctly in the inserted Record, then
// delete everything.
TEST(test_transaction, insert_delete_with_parent) {
const auto &connection =
caosdb::connection::ConnectionManager::GetDefaultConnection();
auto insert_transaction(connection->CreateTransaction());
Entity entity;
entity.SetRole("RecordType");
entity.SetName("RT1");
insert_transaction->InsertEntity(&entity);
insert_transaction->ExecuteAsynchronously();
auto insert_status = insert_transaction->WaitForIt();
ASSERT_TRUE(insert_status.IsTerminated());
ASSERT_FALSE(insert_status.IsError());
}
// TODO(fspreck) Insert a Record with a parent and a Property. Check
// for success and delete everything.
} // namespace caosdb::transaction
Loading