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:
Scott Schurr
2014-11-17 14:05:42 -08:00
committed by Nik Bougalis
parent 685fe5b0fb
commit f9aa3e0da5
3 changed files with 760 additions and 49 deletions

View File

@@ -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;