Added E2M UT Improvemnet TestCases
[ric-plt/e2mgr.git] / E2Manager / managers / nodeb_validator_test.go
1 package managers
2
3 import (
4        /* "e2mgr/configuration"
5         "e2mgr/logger"
6         "e2mgr/mocks"
7         "e2mgr/services"
8         "gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/common"
9        */
10         "gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/entities"
11         //"github.com/pkg/errors"
12         "github.com/stretchr/testify/assert"
13         "testing"
14 )
15
16 func initNodebValidatorTest(t *testing.T)(*NodebValidator){
17       nodebValidator := NewNodebValidator()
18       return nodebValidator
19 }
20
21 func TestIsGnbValid(t *testing.T){
22      nodebValidator := initNodebValidatorTest(t)
23      gnb := entities.Gnb{}
24      res := nodebValidator.IsGnbValid(&gnb)
25      assert.NotNil(t,res)
26 }
27
28
29 func TestIsEnbValid(t *testing.T){
30      nodebValidator := initNodebValidatorTest(t)
31      enb := entities.Enb{}
32      res := nodebValidator.IsEnbValid(&enb)
33      assert.NotNil(t,res)
34 }
35
36 func TestIsServedNrCellInformationValid(t *testing.T){
37         servedNrCellInformation :=  entities.ServedNRCellInformation{}
38         err := isServedNrCellInformationValid(&servedNrCellInformation)
39         assert.NotNil(t,err)
40 }
41
42 func TestIsServedNrCellInfoTddValid(t *testing.T){
43         tdd := entities.ServedNRCellInformation_ChoiceNRMode_TddInfo{}
44         err := isServedNrCellInfoTddValid(&tdd)
45         assert.Nil(t,err)
46 }
47
48 func TestIsServedNrCellInfoFddValid(t *testing.T){
49         fdd := entities.ServedNRCellInformation_ChoiceNRMode_TddInfo{}
50         err := isServedNrCellInfoTddValid(&fdd)
51         assert.Nil(t,err)
52 }
53
54 func TestIsNrNeighbourInfoTddValid(t *testing.T){
55         tdd := entities.NrNeighbourInformation_ChoiceNRMode_TddInfo{}
56         err := isNrNeighbourInfoTddValid(&tdd)
57         assert.Nil(t,err)
58 }
59
60 func TestIsNrNeighbourInfoFddValid(t *testing.T){
61         fdd := entities.NrNeighbourInformation_ChoiceNRMode_FddInfo{}
62         err := isNrNeighbourInfoFddValid(&fdd)
63         assert.Nil(t,err)
64 }
65
66 func TestIsTddInfoValid(t *testing.T){
67         tdd := entities.TddInfo{}
68         err := isTddInfoValid(&tdd)
69         assert.Nil(t,err)
70 }
71
72 func TestIsFddInfoValid(t *testing.T){
73         fdd := entities.FddInfo{}
74         err := isFddInfoValid(&fdd)
75         assert.Nil(t,err)
76 }
77
78 func TestIsServedNrCellInfoChoiceNrModeValid(t *testing.T){
79         choiceNrMode := entities.ServedNRCellInformation_ChoiceNRMode{}
80         res := isServedNrCellInfoChoiceNrModeValid(&choiceNrMode)
81         assert.NotNil(t,res)
82 }
83
84 func  TestIsNrNeighbourInformationValid(t *testing.T){
85         nrNeighbourInformation := entities.NrNeighbourInformation{}
86         res := isNrNeighbourInformationValid(&nrNeighbourInformation)
87         assert.NotNil(t,res)
88 }
89
90 func TestIsNrNeighbourInfoChoiceNrModeValid(t *testing.T){
91         choiceNrMode := entities.NrNeighbourInformation_ChoiceNRMode{}
92         res := isNrNeighbourInfoChoiceNrModeValid(&choiceNrMode)
93         assert.NotNil(t,res)
94 }
95