Changes for page Java Unit Testing

Last modified by Vincent Massol on 2023/05/03 15:57

<
From version < 6.2 >
edited by Vincent Massol
on 2018/06/14 11:20
To version < 7.1 >
edited by Vincent Massol
on 2018/09/12 11:59
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -252,6 +252,18 @@
252 252  
253 253  You can use ##@AfterComponent## to perform some setup after the mock components have been setup.
254 254  
255 +=== Order ===
256 +
257 +It's important to understand the order used to resolve all those annotations:
258 +
259 +1. Create an empty Mockito Component Manager
260 +1. Inject ##@InjectComponentManager## fields
261 +1. Inject ##@MockComponent## fields
262 +1. Call ##@BeforeComponent## methods
263 +1. Fill the Mockito Component Manager (with components matching the ##@AllComponent## and ##@ComponentList## annotations)
264 +1. Call ##@AfterComponent## methods
265 +1. Inject ##@InjectMockComponents## fields
266 +
255 255  == Capturing and Asserting Logs ==
256 256  
257 257  If the code under tests output logs, they need to be captured and possibly asserted. For example:

Get Connected