Search the courses, subjects, tracks, games and features, or jump straight to a page.
3 cards from this section. Quick, good the night before a test.
What annotation do you use to mark a test method in JUnit?
It's a single-character text that begins with '@'.
What is the purpose of assertEquals?
Think of equality checking.
What does the @Test annotation do?
Look at which entity it is marking!
The method assertEquals checks if _____ .
Consider the meaning of equality in tests.
Create and implement a unit test for a Calculator class that includes methods for multiplication and division. Ensure all tests are comprehensive.
Think about edge cases when writing your tests.
Explain the importance of clear failure messages in unit tests and how they aid in debugging.
Why do you think a developer needs clarity when tests fail?
5 more questions in this section. Enroll free to practise them all.
Enroll free