Skip to content

Commit

Permalink
Double check the presence of our TX manager.
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-simons committed May 3, 2024
1 parent f8463d4 commit f93b553
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.web.server.LocalServerPort;
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
import org.springframework.data.web.JsonPath;
import org.springframework.context.ApplicationContext;
import org.springframework.data.neo4j.transaction.Neo4jTransactionManager;
import org.springframework.http.HttpStatus;
import org.springframework.http.HttpStatusCode;
import org.springframework.http.MediaType;
import org.springframework.transaction.TransactionManager;
import org.testcontainers.containers.Neo4jContainer;
import org.testcontainers.junit.jupiter.Container;
import org.testcontainers.junit.jupiter.Testcontainers;
Expand Down Expand Up @@ -73,4 +73,11 @@ void contextLoadsAndRepositoriesAreFunctional() throws IOException, InterruptedE
assertThat(newPerson.getId()).isNotNegative();
assertThat(newPerson.getName()).isEqualTo("Michael Simons");
}

@Test
void transactionManagerAvailable(@Autowired ApplicationContext ctx) {

assertThat(ctx.getBean(TransactionManager.class))
.isNotNull().isInstanceOf(Neo4jTransactionManager.class);
}
}

0 comments on commit f93b553

Please sign in to comment.