[RICPLT-1898] - Replace http router to gorilla-mux + UT + Automation code
[ric-plt/e2mgr.git] / E2Manager / mocks / nodebControllerMock.go
diff --git a/E2Manager/mocks/nodebControllerMock.go b/E2Manager/mocks/nodebControllerMock.go
new file mode 100644 (file)
index 0000000..51b5bf0
--- /dev/null
@@ -0,0 +1,35 @@
+package mocks
+
+import (
+       "github.com/gorilla/mux"
+       "github.com/stretchr/testify/mock"
+       "net/http"
+)
+
+type NodebControllerMock struct {
+       mock.Mock
+}
+
+func (rc *NodebControllerMock) HandleRequest(writer http.ResponseWriter, request *http.Request) {
+       rc.Called()
+}
+
+func (rc *NodebControllerMock) GetNodebIdList (writer http.ResponseWriter, request *http.Request) {
+       rc.Called()
+}
+
+func (rc *NodebControllerMock) GetNodeb(writer http.ResponseWriter, request *http.Request) {
+       writer.Header().Set("Content-Type", "application/json")
+       writer.WriteHeader(http.StatusOK)
+
+       vars := mux.Vars(request)
+       ranName := vars["ranName"]
+
+       writer.Write([]byte(ranName))
+
+       rc.Called()
+}
+
+func (rc *NodebControllerMock) HandleHealthCheckRequest(writer http.ResponseWriter, request *http.Request) {
+       rc.Called()
+}