-func TestX2SetupRequestHandler(t *testing.T) {
- rmrMessengerMock := &mocks.RmrMessengerMock{}
-
- log := initLog(t)
- readerProvider := func() reader.RNibReader {
- return &mocks.RnibReaderMock{}
- }
- writerProvider := func() rNibWriter.RNibWriter {
- return &mocks.RnibWriterMock{}
- }
-
- ranSetupManager := managers.NewRanSetupManager(log, getRmrService(rmrMessengerMock, log), rNibWriter.GetRNibWriter)
- provider := NewIncomingRequestHandlerProvider(log, getRmrService(rmrMessengerMock, log), configuration.ParseConfiguration(), writerProvider, readerProvider,ranSetupManager)
-
- handler, err := provider.GetHandler(X2SetupRequest)
-
- assert.NotNil(t, provider)
- assert.Nil(t, err)
-
- _, ok := handler.(*httpmsghandlers.SetupRequestHandler)
-
- assert.True(t, ok)
-}
-
-func TestEndcSetupRequestHandler(t *testing.T) {
- rmrMessengerMock := &mocks.RmrMessengerMock{}
-
- log := initLog(t)
- readerProvider := func() reader.RNibReader {
- return &mocks.RnibReaderMock{}
- }
- writerProvider := func() rNibWriter.RNibWriter {
- return &mocks.RnibWriterMock{}
- }
-
- ranSetupManager := managers.NewRanSetupManager(log, getRmrService(rmrMessengerMock, log), rNibWriter.GetRNibWriter)
- provider := NewIncomingRequestHandlerProvider(log, getRmrService(rmrMessengerMock, log), configuration.ParseConfiguration(), writerProvider, readerProvider,ranSetupManager)
-
- handler, err := provider.GetHandler(EndcSetupRequest)