|
|
|
@ -106,6 +106,31 @@ public class EeaSendRawTransactionTest { |
|
|
|
|
assertThat(actualResponse).isEqualToComparingFieldByField(expectedResponse); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
public void requestHasNullObjectParameter() { |
|
|
|
|
final JsonRpcRequest request = new JsonRpcRequest("2.0", "eea_sendRawTransaction", null); |
|
|
|
|
|
|
|
|
|
final JsonRpcResponse expectedResponse = |
|
|
|
|
new JsonRpcErrorResponse(request.getId(), JsonRpcError.INVALID_PARAMS); |
|
|
|
|
|
|
|
|
|
final JsonRpcResponse actualResponse = method.response(request); |
|
|
|
|
|
|
|
|
|
assertThat(actualResponse).isEqualToComparingFieldByField(expectedResponse); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
public void requestHasNullArrayParameter() { |
|
|
|
|
final JsonRpcRequest request = |
|
|
|
|
new JsonRpcRequest("2.0", "eea_sendRawTransaction", new String[] {null}); |
|
|
|
|
|
|
|
|
|
final JsonRpcResponse expectedResponse = |
|
|
|
|
new JsonRpcErrorResponse(request.getId(), JsonRpcError.INVALID_PARAMS); |
|
|
|
|
|
|
|
|
|
final JsonRpcResponse actualResponse = method.response(request); |
|
|
|
|
|
|
|
|
|
assertThat(actualResponse).isEqualToComparingFieldByField(expectedResponse); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
public void invalidTransactionRlpDecoding() { |
|
|
|
|
final String rawTransaction = "0x00"; |
|
|
|
|