(t *testing.T)
| 382 | } |
| 383 | |
| 384 | func TestBalance_CommitInflightCredit(t *testing.T) { |
| 385 | balance := &Balance{ |
| 386 | InflightCreditBalance: big.NewInt(400), |
| 387 | CreditBalance: big.NewInt(100), |
| 388 | } |
| 389 | txn := &Transaction{ |
| 390 | Amount: 300, |
| 391 | Precision: 1, |
| 392 | } |
| 393 | balance.CommitInflightCredit(txn) |
| 394 | assert.Equal(t, big.NewInt(100), balance.InflightCreditBalance) |
| 395 | assert.Equal(t, big.NewInt(400), balance.CreditBalance) |
| 396 | } |
| 397 | |
| 398 | func TestBalance_RollbackInflightCredit(t *testing.T) { |
| 399 | balance := &Balance{ |
nothing calls this directly
no test coverage detected