Files
cgrates/engine/model_helpers_test.go
Radu Ioan Fericean 9c66af024d compilation fixes
2015-06-02 23:29:09 +03:00

22 lines
530 B
Go

package engine
import "testing"
func TestModelHelperCsvLoad(t *testing.T) {
l, err := csvLoad(TpDestination{}, []string{"TEST_DEST", "+492"})
tpd := l.(TpDestination)
if err != nil || tpd.Tag != "TEST_DEST" || tpd.Prefix != "+492" {
t.Errorf("model load failed: %+v", tpd)
}
}
func TestModelHelperCsvDump(t *testing.T) {
tpd := &TpDestination{
Tag: "TEST_DEST",
Prefix: "+492"}
csv, err := csvDump(tpd)
if err != nil || csv[0] != "TEST_DEST" || csv[1] != "+492" {
t.Errorf("model load failed: %+v", tpd)
}
}