Loading...
Loading...
Section 18 · Stage 5: Work Like a Developer
Unit tests with JUnit, mocks with Mockito, testing Spring applications, using the debugger and keeping code clean.
What tests protect you from and which kinds of tests to write.
Go past simple assertions to well-organised, data-driven tests.
Write the test first and let it shape the design.
Test one class at a time by replacing its dependencies with mocks.
Test each layer of a Spring Boot app with the right test slice.
Find the cause of a bug with the debugger instead of guessing.
Write logs that help you find problems in a running application.
Keep code easy to read and change as the project grows.
Add unit, slice and integration tests to ShopLite and fix the bugs they find.
These sections are ready to study now.