(t *testing.T)
| 24 | ) |
| 25 | |
| 26 | func 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 | } |
nothing calls this directly
no test coverage detected