-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2078 from rsksmart/fix-eth-filter-methods
Add filterNotFound exception to RskJsonRpcRequestException class
- Loading branch information
Showing
4 changed files
with
138 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
rskj-core/src/test/java/org/ethereum/rpc/FilterManagerTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package org.ethereum.rpc; | ||
|
||
import org.ethereum.facade.Ethereum; | ||
import org.ethereum.rpc.exception.RskJsonRpcRequestException; | ||
import org.junit.jupiter.api.Assertions; | ||
import org.junit.jupiter.api.Test; | ||
|
||
public class FilterManagerTest { | ||
|
||
@Test | ||
void whenGetFilterEvent_throwFilterNotFoundException() { | ||
Ethereum ethMock = Web3Mocks.getMockEthereum(); | ||
FilterManager filterManager = new FilterManager(ethMock); | ||
|
||
Assertions.assertThrowsExactly( | ||
RskJsonRpcRequestException.class, | ||
() -> filterManager.getFilterEvents(1, false), | ||
"filter not found" | ||
); | ||
} | ||
} |
Oops, something went wrong.