mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-27 06:25:51 +00:00
Add more unit tests to rpc/impl/TransactionSign (RIPD-480):
By adding a mock it is possible to test the transactionSign function without interacting with the ledger. This is the smallest change I could come up with that allows transactionSign to be unit tested. The unit tests are white boxed. Each test case is a result of examining the code and identifying behavior associated with different JSON fields. That means the tests are not based on requirements, they are based on observed behavior.
This commit is contained in:
committed by
Nik Bougalis
parent
685fe5b0fb
commit
f9aa3e0da5
@@ -997,7 +997,7 @@ amountFromJsonNoThrow (STAmount& result, Json::Value const& jvSource)
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
WriteLog (lsINFO, STAmount) <<
|
||||
WriteLog (lsDEBUG, STAmount) <<
|
||||
"amountFromJsonNoThrow: caught: " << e.what ();
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user