mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-17 14:19:54 +05:00
Test suppliers.ArgsGetSuppliers.asOptsGetSuppliers
This commit is contained in:
committed by
Dan Christian Bogos
parent
734a551903
commit
9c77b42f15
@@ -18,6 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
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))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user