Skip to content

aabarmin/epam-spring-testing

Repository files navigation

Example for the Spring Testing speech

The following examples are available:

Class Example
PostServiceSpringTest Configuring Spring' context, using @MockBean for mocking
PostControllerSpringBootTest Configuring context with @SpringBootTest
PostControllerWithDbInitTest Using @Sql to prepare database
PostControllerJsonTest Using @JsonTest for slicing the serialization/deserialization logic
PostControllerWebMvcTest Using @WebMvcTest for testing REST controllers
AdminControllerHtmlTest Using @WebMvcTest for testing MVC controllers
PostRepositoryDataJpaTest Using @DataJpaTest for testing Spring Data JPA repositories
PostJdbcTest Using @JdbcTest for testing plan SQL queries
PostImporterRestClientTest Using @RestClientTest for testing communication with external services
PostServiceTestContainersTest Using TestContainers for working with real dependencies

About

Examples for Spring Testing speech

Topics

Resources

License

Stars

Watchers

Forks

Languages