mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Updated tests in SharedGroup
This commit is contained in:
committed by
Dan Christian Bogos
parent
1db6f91ad5
commit
66477fd97c
@@ -25,8 +25,13 @@ import (
|
||||
)
|
||||
|
||||
func TestSharedGroupClone(t *testing.T) {
|
||||
//nil check
|
||||
var sharedGroup *SharedGroup
|
||||
if rcv := sharedGroup.Clone(); rcv != nil {
|
||||
t.Errorf("Expecting: nil, received: %+v", utils.ToJSON(rcv))
|
||||
}
|
||||
//empty check
|
||||
sharedGroup := &SharedGroup{}
|
||||
sharedGroup = &SharedGroup{}
|
||||
eOut := &SharedGroup{}
|
||||
if rcv := sharedGroup.Clone(); !reflect.DeepEqual(eOut, rcv) {
|
||||
t.Errorf("Expecting: %+v, received: %+v", utils.ToJSON(eOut), utils.ToJSON(rcv))
|
||||
@@ -80,14 +85,13 @@ func TestSharedGroupClone(t *testing.T) {
|
||||
|
||||
func TestSharingParametersClone(t *testing.T) {
|
||||
//nil check
|
||||
sharingParameters := &SharingParameters{}
|
||||
eOut := &SharingParameters{}
|
||||
if rcv := sharingParameters.Clone(); !reflect.DeepEqual(eOut, rcv) {
|
||||
t.Errorf("Expecting: %+v, received: %+v", utils.ToJSON(eOut), utils.ToJSON(rcv))
|
||||
var sharingParameters *SharingParameters
|
||||
if rcv := sharingParameters.Clone(); rcv != nil {
|
||||
t.Errorf("Expecting:nil, received: %+v", utils.ToJSON(rcv))
|
||||
}
|
||||
//empty check
|
||||
sharingParameters = &SharingParameters{Strategy: "", RatingSubject: ""}
|
||||
eOut = &SharingParameters{Strategy: "", RatingSubject: ""}
|
||||
sharingParameters = &SharingParameters{}
|
||||
eOut := &SharingParameters{}
|
||||
if rcv := sharingParameters.Clone(); !reflect.DeepEqual(eOut, rcv) {
|
||||
t.Errorf("Expecting: %+v, received: %+v", utils.ToJSON(eOut), utils.ToJSON(rcv))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user