Learn Software Testing With Assert, Junit, Mockito
I. Introduction With the recent release of Spring 2.2.0, it is now loaded with JUnit5. What I personally like with this version is the...
https://www.czetsuyatech.com/2019/11/mockito-fundamentals-of-testing-with-assert.html
I. Introduction
With the recent release of Spring 2.2.0, it is now loaded with JUnit5. What I personally like with this version is the transition to Java 8, which means Lambda expressions are now supported. And it doesn’t hurt to update as JUnit5 is backward compatible. That means that old tests will still run and update can be gradual.
II. Creating the Spring Boot Project
Using the Spring STS IDE perform the following:
- Create a new project using the Spring Starter Project template.
- Add the following dependencies:
-spring-boot-starter-web
-spring-boot-starter-data-jpa
-spring-boot-devtools
-h2
-lombok - Add plugin maven-surefire-plugn
- Add the following properties to your application.properties file:
-spring.main.allow-bean-definition-overriding=true
-spring.jpa.hibernate.ddl-auto=create-drop - Create the entity, repository and service classes available at the end of this blog.
Post a Comment