r/learnjava • u/erebrosolsin • Dec 24 '25
How to learn unit/integration tests?
I have paid for a course in Udemy and what it teaches is only syntax. Spending more than 10 minutes for every JUnit method.
The projects I build in spring boot are small that I think it won't be good place to learn unit testing there. Big and more complex ones would be great. Suggest me resources to learn and practice.
12
Upvotes
View all comments
Show parent comment
2
u/TheFaustX Dec 25 '25
You test a unit of work, if the code will sort a collection of items in a certain way you don't care where the items come from. Your test will check whether the items you put in are sorted as you expect it.