[RIC-397] rename method to UpdateNodebInfoOnConnectionStatusInversion
[ric-plt/e2mgr.git] / E2Manager / services / rnib_data_service_test.go
index 1d59846..f6529e3 100644 (file)
@@ -259,27 +259,27 @@ func TestPingRnibOkOtherError(t *testing.T) {
        assert.True(t, res)
 }
 
-func TestSuccessfulUpdateNodebConnectivityState(t *testing.T) {
+func TestSuccessfulUpdateNodebInfoOnConnectionStatusInversion(t *testing.T) {
        rnibDataService, _, writerMock := setupRnibDataServiceTest(t)
        event := "event"
 
        nodebInfo := &entities.NodebInfo{}
-       writerMock.On("UpdateNodebConnectivityState", nodebInfo, CHANNEL_NAME, event).Return(nil)
+       writerMock.On("UpdateNodebInfoOnConnectionStatusInversion", nodebInfo, CHANNEL_NAME, event).Return(nil)
 
-       rnibDataService.UpdateNodebConnectivityState(nodebInfo, event)
-       writerMock.AssertNumberOfCalls(t, "UpdateNodebConnectivityState", 1)
+       rnibDataService.UpdateNodebInfoOnConnectionStatusInversion(nodebInfo, event)
+       writerMock.AssertNumberOfCalls(t, "UpdateNodebInfoOnConnectionStatusInversion", 1)
 }
 
-func TestConnFailureUpdateNodebConnectivityState(t *testing.T) {
+func TestConnFailureUpdateNodebInfoOnConnectionStatusInversion(t *testing.T) {
        rnibDataService, _, writerMock := setupRnibDataServiceTest(t)
        event := "event"
 
        nodebInfo := &entities.NodebInfo{}
        mockErr := &common.InternalError{Err: &net.OpError{Err: fmt.Errorf("connection error")}}
-       writerMock.On("UpdateNodebConnectivityState", nodebInfo, CHANNEL_NAME, event).Return(mockErr)
+       writerMock.On("UpdateNodebInfoOnConnectionStatusInversion", nodebInfo, CHANNEL_NAME, event).Return(mockErr)
 
-       rnibDataService.UpdateNodebConnectivityState(nodebInfo, event)
-       writerMock.AssertNumberOfCalls(t, "UpdateNodebConnectivityState", 3)
+       rnibDataService.UpdateNodebInfoOnConnectionStatusInversion(nodebInfo, event)
+       writerMock.AssertNumberOfCalls(t, "UpdateNodebInfoOnConnectionStatusInversion", 3)
 }
 
 //func TestConnFailureThenSuccessGetNodebIdList(t *testing.T) {