rippled icon indicating copy to clipboard operation
rippled copied to clipboard

chore: replaced friend for unit-test with mock

Open vlntb opened this issue 1 year ago • 0 comments

Improving unit-test that have to access class internals

Context of Change

Replacing friend relationship between tested class (STLedgerEntry) and unit-test (Invariants_test) in favour of using mock. The change has no functional impact.

Type of Change

  • [x] Removed Invariants_test as a friend from STLedgerEntry.
  • [x] Declared a mock class that avoids checking LedgerFormats on construction.
  • [x] Made a dummy Nickname ledger entry to trigger an invalid ledger entry error.

API Impact

  • None

vlntb avatar Jun 24 '24 14:06 vlntb