package ledger

import (
	"testing"
)

func TestDelta(t *testing.T) {
	d := "2099-08-07"
	delta := newDelta("x", true, d, "", "name", 34.56, "$", false, "", 0, []string{"d2"})

	if delta.Transaction != "x" {
		t.Error(delta.Transaction)
	}
	if !delta.Payee {
		t.Error(delta.Payee)
	}
	if delta.Date != d {
		t.Error(delta.Date)
	}
	if delta.OtherDates[0] != "d2" {
		t.Error(delta.OtherDates)
	}
	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)
}
