Spring Boot Testing with JUnit 7 - POST Api Unit Test

preview_player
Показать описание
Hello! Welcome to Springboot + Junit Tutorial
Video 7: POST Api Unit Test

in this video we will create a basic Spring application and use JUnit to test it. Because you're presumably already familiar with writing and running unit tests for specific classes in your application, we'll focus on using Spring Test and Spring Boot to test the interactions between Spring and your code in this video.
#SpringBoot #JUnit #Mockito

About Me -

Welcome to this course on Spring Boot Tutorials for Beginners. Spring Boot is a tool for getting started very quickly with Spring applications. Spring Boot Focuses attention at a single point and Control a large collection of spring-* projects. Spring Boot allows a user to create stand-alone, production-grade Spring Applications and Exposes a lot of useful features by default.
Рекомендации по теме
Комментарии
Автор

Do you know that since JUnit5 test methods don't need to be specified public?

DelphyM
Автор

Hi, Thanks for uploading this series. I've got a question. While I was working on writing a test for my endpoints I encountered an issue when mocking. As you mentioned for the post method, when mocking you mocked as but when I did the same, I was getting an empty response body. After I changed the mocking to it worked for me. But I fail to understand why it's not working for me? Could you please help me understand this?

Thanks

muqeemuddin
join shbcf.ru