Files
cgrates/mediator/mediator_test.go

32 lines
682 B
Go

package mediator
import (
//"testing"
)
/*
func TestIndexLengthDifferent(t *testing.T) {
m := new(Mediator)
objs := []*mediatorFieldIdxs{&m.directionIndexs, &m.torIndexs, &m.tenantIndexs, &m.subjectIndexs,
&m.accountIndexs, &m.timeStartIndexs, &m.durationIndexs, &m.uuidIndexs}
for _, o := range objs {
o.Load("1,2,3")
}
m.destinationIndexs.Load("4,5")
if m.validateIndexses() {
t.Error("Error checking length")
}
}
func TestLoad(t *testing.T) {
m := new(Mediator)
objs := []*mediatorFieldIdxs{&m.directionIndexs}
for _, o := range objs {
o.Load("1,2,3")
}
if len(m.directionIndexs) != 3 {
t.Errorf("Expected %v was %v", 3, len(m.directionIndexs))
}
}
*/