Aspire Javanista to Java Master Javanista to Java Master Track 1: Unit Testing
Final Exam: Unit Testing will test your knowledge and application of the topics presented throughout the Unit Testing track of the Aspire Javanista to Java Master Journey.
Objectives |
Final Exam: Unit Testing - add dependencies for JUnit and Mockito
- apply the RepeatedTest annotation to run a test case multiple time
- compile and run enabled test cases in your project using Apache Maven
- configure a test case to execute only when a specified assumption is satisfied
- configure mocks with the when().thenReturn() syntax with input arguments
- configure stubs to throw exceptions
- create a customized JUnit annotation composed of several built-in annotations
- create a Java project using an Apache Maven archetype that includes a separate test directory
- create mocks using the @Mock annotation
- create partial mocks using spies
- define the dependencies and configurations for a simple JSF application
- demonstrate how ordered mocks work
- describe the libraries and annotations that can be used to define JUnit tests
- develop test cases that ensure a unit of an app can run within a specified time
- identify the benefits of using Mockito to mock objects
- illustrate the nuances of the verify() function
- implement test cases that verify Boolean data and objects
- mock objects in a real-world scenario
- recall how mocks can be used with unit tests
- recall the benefits of using Mockito to mock objects
- set JUnit test cases to execute concurrently
- throw exceptions from methods that return void
- use Apache Maven to execute only specific test cases based on class name, method name, or tags
- use assertions in test cases
- use @ExtendWith to automatically initialize mocks
- use spies with interfaces
- use the DisplayName annotation to set a descriptive name for a test case
- use the @InjectMock annotation to inject mocks
- use the ValueSource annotation to run a parameterized test case several times for a set of pre-defined parameters
- work with argument captors
|