(t *testing.T)
| 516 | } |
| 517 | |
| 518 | func TestBalanceMonitor_CheckCondition(t *testing.T) { |
| 519 | balance := &Balance{ |
| 520 | Balance: big.NewInt(1000), |
| 521 | } |
| 522 | monitor := &BalanceMonitor{ |
| 523 | Condition: AlertCondition{ |
| 524 | Field: "balance", |
| 525 | Operator: ">", |
| 526 | PreciseValue: big.NewInt(500), |
| 527 | }, |
| 528 | } |
| 529 | result := monitor.CheckCondition(balance) |
| 530 | assert.True(t, result) |
| 531 | |
| 532 | monitor.Condition.Operator = "<" |
| 533 | result = monitor.CheckCondition(balance) |
| 534 | assert.False(t, result) |
| 535 | } |
| 536 | |
| 537 | func TestExternalTransaction_ToInternalTransaction(t *testing.T) { |
| 538 | extTxn := &ExternalTransaction{ |
nothing calls this directly
no test coverage detected