mirror of
https://github.com/songoda/SongodaCore.git
synced 2024-11-23 10:35:18 +01:00
404a94c307
MockBukkit is not able to mock all of Bukkit's API and broke with a change in PaperMC causing all our current tests to fail. It is also version dependant. But with Mockito you have to do everything manually right now. No helping functionality (like creating a new mock player which automatically will be returned in `Bukkit#getOnlinePlayers()`) I took this opportunity to learn a bit about Mocking in Bukkit and decided on Mockito. It looks like we could easily write our own MockBukkit alternative in the future. I am not really happy how `Mockito#verify` works tho. I find it annoying not to be able to directly assert on the calls made to a method. You have to create an InOrder instance first for the mock and in the end verify with `Mockito#times(0)`/`Mockito#never()` and `Mockito#any()` for each argument a method takes, to assert a total of n calls. |
||
---|---|---|
.. | ||
src/main/java/com/songoda/core/compatibility | ||
pom.xml |