diff --git a/engine/suppliers_test.go b/engine/suppliers_test.go index 9b392e801..24a02bae4 100644 --- a/engine/suppliers_test.go +++ b/engine/suppliers_test.go @@ -18,6 +18,7 @@ along with this program. If not, see package engine import ( + "fmt" "reflect" "testing" "time" @@ -667,3 +668,20 @@ func TestSuppliersSortedForEventWithLimitAndOffset(t *testing.T) { t.Errorf("Expecting: %+v,received: %+v", utils.ToJSON(eFirstSupplierProfile), utils.ToJSON(sprf)) } } + +func TestSuppliersAsOptsGetSuppliers(t *testing.T) { + var s ArgsGetSuppliers + spl := &optsGetSuppliers{ + ignoreErrors: false, + maxCost: 0.0, + } + fmt.Printf("Pointer spl: %+v\n", spl) + sprf, err := s.asOptsGetSuppliers() + fmt.Printf("Pointer sprf: %+v\n", sprf) + if err != nil { + t.Errorf("Error: %+v", err) + } + if !reflect.DeepEqual(spl, sprf) { + t.Errorf("Expecting: %+v,received: %+v", utils.ToJSON(spl), utils.ToJSON(sprf)) + } +}