[RICPLT-1854] Refactor X2/ENDC Setup/Setup Failure Response
[ric-plt/e2mgr.git] / E2Manager / mocks / controllerMock.go
1 package mocks
2
3 import (
4         "github.com/gorilla/mux"
5         "github.com/stretchr/testify/mock"
6         "net/http"
7 )
8
9 type ControllerMock struct {
10         mock.Mock
11 }
12
13 func (c *ControllerMock) ShutdownHandler(writer http.ResponseWriter, r *http.Request){
14         c.Called()
15 }
16
17 func (c *ControllerMock) X2ResetHandler(writer http.ResponseWriter, r *http.Request){
18         writer.Header().Set("Content-Type", "application/json")
19         writer.WriteHeader(http.StatusOK)
20
21         vars := mux.Vars(r)
22         ranName := vars["ranName"]
23
24         writer.Write([]byte(ranName))
25
26         c.Called()
27 }
28