Search the courses, subjects, tracks, games and features, or jump straight to a page.
4 cards from this section. Quick, good the night before a test.
What is the purpose of the setup component in a unit test?
Think about what you need to ensure everything is ready before the test.
Name one assertion method you can use in JUnit.
Recall what methods we use to check for expected results.
What phase follows setup in a unit test?
Think about the order of operations in a test.
True or False: Teardown is mandatory in every unit test.
Consider if cleanup is needed for all tests.
Design a unit test that measures the performance of a sorting function, including all phases: setup, execution, assertion, and teardown.
Consider how to verify that the array is sorted correctly post-execution.
Create a scenario where tests may fail due to an improper setup phase. What could happen?
Think about how initial conditions impact the functionality being tested.
6 more questions in this section. Enroll free to practise them all.
Enroll free