You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the book, it mentions to use @SPY for random field in the ChallengeGeneratorServiceTest.java. But i am able to use @mock, and the testing still passed. I am currently using spring boot 3.2.0. Any idea why?
In the book. it also mentions "since the basic Java classes implementing random generators do not work on interfaces (which you could then simply mock instead of spy), not sure if can elaborate on this, cos not sure what that mean.
The text was updated successfully, but these errors were encountered:
hannah23280
changed the title
Chapter 03: ChallengeGeneratorServiceTest.java
Chapter 03: ChallengeGeneratorServiceTest.java - @Mock can also be used, instead of @Spy
Dec 19, 2023
In the book, it mentions to use @SPY for random field in the ChallengeGeneratorServiceTest.java. But i am able to use @mock, and the testing still passed. I am currently using spring boot 3.2.0. Any idea why?
In the book. it also mentions "since the basic Java classes implementing random generators do not work on interfaces (which you could then simply mock instead of spy), not sure if can elaborate on this, cos not sure what that mean.
The text was updated successfully, but these errors were encountered: