Skip to content
Snippets Groups Projects
Commit 82d75b25 authored by florian's avatar florian
Browse files

DRAFT: Begin tests for transactions

parent 1cf223b6
No related branches found
No related tags found
1 merge request!7ENH: Implement queries and entity retrieval
......@@ -64,4 +64,24 @@ using CaosDB
),
) CaosDB.Exceptions.evaluate_return_code(Cint(-1))
end
@testset "TestTransaction" begin
# transactions can be generated from the default connection,
# from a connection name, or from a connection object
@test CaosDB.Transaction.create_transaction() != nothing
@test CaosDB.Transaction.create_transaction("default") != nothing
conn = CaosDB.Connection.get_connection()
@test CaosDB.Transaction.create_transaction != nothing
# Retrieval works by a single id, by a list of ids, or by querying
trans1 = CaosDB.Transaction.create_transaction()
@test CaosDB.Transaction.add_retrieve_by_id(trans1, "some_id") == nothing
trans2 = CaosDB.Transaction.create_transaction()
@test CaosDB.Transaction.add_retrieve_by_id(["id1", "id2", "id3"]) == nothing
trans3 = CaosDB.Transaction.create_transaction()
@test CaosDB.Transaction.add_query("FIND ENTITY WITH id=123") == nothing
end
@testset "TestEntity" begin end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment