28 lines
436 B
Go
28 lines
436 B
Go
package ledger
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestDelta(t *testing.T) {
|
|
d := "2099-08-07"
|
|
delta := newDelta("x", d, "", "name", 34.56, "$", false)
|
|
|
|
if delta.transaction != "x" {
|
|
t.Error(delta.transaction)
|
|
}
|
|
if delta.Date != d {
|
|
t.Error(delta.Date)
|
|
}
|
|
if delta.Name != "name" {
|
|
t.Error(delta.Name)
|
|
}
|
|
if delta.Value != 34.56 {
|
|
t.Error(delta.Value)
|
|
}
|
|
if delta.Currency != USD {
|
|
t.Error(delta.Currency)
|
|
}
|
|
t.Log(delta)
|
|
}
|