mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-20 06:38:45 +05:00
Added some tests
This commit is contained in:
committed by
Dan Christian Bogos
parent
4a5c0f9819
commit
7cdc7efcde
@@ -76,3 +76,17 @@ func TestValueFormulaParseBalanceFilterValue(t *testing.T) {
|
||||
t.Errorf("Expecting: %+v, received: %+v", eVF, vf)
|
||||
}
|
||||
}
|
||||
|
||||
func TestValueFormulaString(t *testing.T) {
|
||||
vf := &ValueFormula{}
|
||||
eOut := `{"Method":"","Params":null,"Static":0}`
|
||||
if rcv := vf.String(); !reflect.DeepEqual(eOut, rcv) {
|
||||
t.Errorf("Expecting: %+v, received: %+v", eOut, rcv)
|
||||
}
|
||||
|
||||
vf = &ValueFormula{Static: 10000000000.0}
|
||||
eOut = `{"Method":"","Params":null,"Static":10000000000}`
|
||||
if rcv := vf.String(); !reflect.DeepEqual(eOut, rcv) {
|
||||
t.Errorf("Expecting: %+v, received: %+v", eOut, rcv)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user