File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
src/test/java/com/arangodb Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -827,6 +827,26 @@ public void transactionallowImplicit() {
827827 }
828828 }
829829
830+ protected static class TransactionTestEntity {
831+ private String value ;
832+
833+ public TransactionTestEntity () {
834+ super ();
835+ }
836+ }
837+
838+ @ Test
839+ public void transactionPojoReturn () {
840+ final String action = "function() { return {'value':'hello world'}; }" ;
841+ final CompletableFuture <TransactionTestEntity > f = db .transaction (action , TransactionTestEntity .class ,
842+ new TransactionOptions ());
843+ assertThat (f , is (notNullValue ()));
844+ f .whenComplete ((res , ex ) -> {
845+ assertThat (res , is (notNullValue ()));
846+ assertThat (res .value , is ("hello world" ));
847+ });
848+ }
849+
830850 @ Test
831851 public void getInfo () throws InterruptedException , ExecutionException {
832852 final CompletableFuture <DatabaseEntity > f = db .getInfo ();
You can’t perform that action at this time.
0 commit comments