Apply method matcher for direct reader (#200)

This commit is contained in:
KirillPamPam
2023-04-11 14:37:17 +04:00
committed by GitHub
parent 9af4b95f8f
commit fc488e1aab
3 changed files with 11 additions and 4 deletions

View File

@@ -113,7 +113,9 @@ class EthereumDirectReaderSpec extends Specification {
transactions = []
}
def up = Mock(Multistream) {
1 * getApiSource(new Selector.HeightMatcher(100)) >> Stub(ApiSource)
1 * getApiSource(
new Selector.Builder().withMatcher(new Selector.HeightMatcher(100)).forMethod("eth_getBlockByNumber").build()
) >> Stub(ApiSource)
}
def calls = Mock(Factory) {
1 * create() >> new DefaultEthereumMethods(Chain.ETHEREUM)