Spock structure: how can I automatically declare the state of an object to reset after BOM completes
I have a Spring service A
that uses a service internally B
.
I want to:
- Mock service
B
- Install the sent version to the service
A
- Testing
A
behavior - Install a previous version of the service
B
for maintenanceA
(reset state)
The problem is with the last step - I can remember B
in setup
and set it in stages cleanup
. But can I set it up automatically (something similar to @ConfineMetaClassChanges
)
+3
source to share