Refactor API tests using mocks
tgrospic opened this issue · comments
Tomislav Grospić commented
Overview
Tests for block API are written as unit tests, but for all dependencies like RuntineManager, BlockDagStorage or BlockStore the real implementation is used.
casper/src/test/scala/coop/rchain/casper/api
This is especially problematic with API methods involving Rholang execution like BlockQueryResponseAPITest for which the whole genesis block is created.
Solution
Remove any dependency to real implementations and use only mocks using Mockito library.