MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / TestToBalance

Function TestToBalance

api/model/model_test.go:346–362  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

344}
345
346func TestToBalance(t *testing.T) {
347 createBalance := CreateBalance{
348 LedgerId: "ledger1",
349 IdentityId: "identity1",
350 Currency: "USD",
351 MetaData: map[string]interface{}{"key": "value"},
352 Precision: 2,
353 }
354
355 balance := createBalance.ToBalance()
356
357 assert.Equal(t, createBalance.LedgerId, balance.LedgerID)
358 assert.Equal(t, createBalance.IdentityId, balance.IdentityID)
359 assert.Equal(t, createBalance.Currency, balance.Currency)
360 assert.Equal(t, createBalance.MetaData, balance.MetaData)
361 assert.Equal(t, createBalance.Precision, balance.CurrencyMultiplier)
362}
363
364func TestToAccount(t *testing.T) {
365 createAccount := CreateAccount{

Callers

nothing calls this directly

Calls 1

ToBalanceMethod · 0.95

Tested by

no test coverage detected