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

Function TestToAccount

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

Source from the content-addressed store, hash-verified

362}
363
364func TestToAccount(t *testing.T) {
365 createAccount := CreateAccount{
366 BalanceId: "balance1",
367 LedgerId: "ledger1",
368 IdentityId: "identity1",
369 Currency: "USD",
370 Number: "123456",
371 BankName: "Test Bank",
372 MetaData: map[string]interface{}{"key": "value"},
373 }
374
375 account := createAccount.ToAccount()
376
377 assert.Equal(t, createAccount.BalanceId, account.BalanceID)
378 assert.Equal(t, createAccount.LedgerId, account.LedgerID)
379 assert.Equal(t, createAccount.IdentityId, account.IdentityID)
380 assert.Equal(t, createAccount.Currency, account.Currency)
381 assert.Equal(t, createAccount.Number, account.Number)
382 assert.Equal(t, createAccount.BankName, account.BankName)
383 assert.Equal(t, createAccount.MetaData, account.MetaData)
384}
385
386func TestToTransaction(t *testing.T) {
387 now := time.Now()

Callers

nothing calls this directly

Calls 1

ToAccountMethod · 0.95

Tested by

no test coverage detected