I have a OnApplicationEvent which executes some fancy scheduled code whenever the server spins up. What I want to do is disable/Override this Call for all at least some of my Unit Tests. I am working in Micronaut Application.
How can I do that?
I have a OnApplicationEvent which executes some fancy scheduled code whenever the server spins up. What I want to do is disable/Override this Call for all at least some of my Unit Tests. I am working in Micronaut Application.
How can I do that?
Copyright © 2021 Jogjafile Inc.
The answer from pks18 on the @Requires(notEnv = Environment.TEST) helped me.