MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / TestTransactionTypeMixin

Function TestTransactionTypeMixin

blockproducer/interfaces/mixins_test.go:26–37  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

24)
25
26func TestTransactionTypeMixin(t *testing.T) {
27 Convey("test transaction type mixin", t, func() {
28 m := NewTransactionTypeMixin(TransactionTypeBaseAccount)
29 So(m.GetTransactionType(), ShouldEqual, TransactionTypeBaseAccount)
30 m.SetTransactionType(TransactionTypeTransfer)
31 So(m.GetTransactionType(), ShouldEqual, TransactionTypeTransfer)
32 now := time.Now()
33 So(now.Sub(m.GetTimestamp()).Seconds(), ShouldBeLessThan, 0.1)
34 m.SetTimestamp(now)
35 So(m.GetTimestamp(), ShouldEqual, now)
36 })
37}

Callers

nothing calls this directly

Calls 5

GetTransactionTypeMethod · 0.95
SetTransactionTypeMethod · 0.95
GetTimestampMethod · 0.95
SetTimestampMethod · 0.95
NewTransactionTypeMixinFunction · 0.85

Tested by

no test coverage detected