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

Function TestBalanceMonitor_CheckCondition

model/model_test.go:518–535  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

516}
517
518func 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
537func TestExternalTransaction_ToInternalTransaction(t *testing.T) {
538 extTxn := &ExternalTransaction{

Callers

nothing calls this directly

Calls 1

CheckConditionMethod · 0.95

Tested by

no test coverage detected