5393a55f630afb1efa742745ead834ff93933668
[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
29 func (c *ControllerMock) X2SetupHandler(writer http.ResponseWriter, r *http.Request){
30         writer.Header().Set("Content-Type", "application/json")
31         writer.WriteHeader(http.StatusOK)
32
33         c.Called()
34 }
35
36 func (c *ControllerMock) EndcSetupHandler(writer http.ResponseWriter, r *http.Request){
37         writer.Header().Set("Content-Type", "application/json")
38         writer.WriteHeader(http.StatusOK)
39
40         c.Called()
41 }