mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-20 22:58:44 +05:00
32 lines
682 B
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))
|
|
}
|
|
}
|
|
*/
|