2 // Copyright 2019 AT&T Intellectual Property
3 // Copyright 2019 Nokia
4 // Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved.
6 // Licensed under the Apache License, Version 2.0 (the "License");
7 // you may not use this file except in compliance with the License.
8 // You may obtain a copy of the License at
10 // http://www.apache.org/licenses/LICENSE-2.0
12 // Unless required by applicable law or agreed to in writing, software
13 // distributed under the License is distributed on an "AS IS" BASIS,
14 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 // See the License for the specific language governing permissions and
16 // limitations under the License.
19 // This source code is part of the near-RT RIC (RAN Intelligent Controller)
20 // platform project (RICP).
25 "github.com/gorilla/mux"
26 "github.com/stretchr/testify/mock"
30 type NodebControllerMock struct {
34 func (c *NodebControllerMock) GetNodeb(writer http.ResponseWriter, r *http.Request) {
35 writer.Header().Set("Content-Type", "application/json")
36 writer.WriteHeader(http.StatusOK)
39 ranName := vars["ranName"]
41 writer.Write([]byte(ranName))
45 func (c *NodebControllerMock) GetNodebIdList(writer http.ResponseWriter, r *http.Request) {
49 func (c *NodebControllerMock) Shutdown(writer http.ResponseWriter, r *http.Request) {
53 func (c *NodebControllerMock) X2Reset(writer http.ResponseWriter, r *http.Request) {
54 writer.Header().Set("Content-Type", "application/json")
55 writer.WriteHeader(http.StatusOK)
58 ranName := vars["ranName"]
60 writer.Write([]byte(ranName))
65 func (c *NodebControllerMock) UpdateGnb(writer http.ResponseWriter, r *http.Request) {
66 writer.Header().Set("Content-Type", "application/json")
67 writer.WriteHeader(http.StatusOK)
72 func (c *NodebControllerMock) UpdateEnb(writer http.ResponseWriter, r *http.Request) {
73 writer.Header().Set("Content-Type", "application/json")
74 writer.WriteHeader(http.StatusOK)
79 func (c *NodebControllerMock) AddEnb(writer http.ResponseWriter, r *http.Request) {
80 writer.Header().Set("Content-Type", "application/json")
81 writer.WriteHeader(http.StatusCreated)
85 func (c *NodebControllerMock) DeleteEnb(writer http.ResponseWriter, r *http.Request) {
86 writer.Header().Set("Content-Type", "application/json")
87 writer.WriteHeader(http.StatusNoContent)
91 func (c *NodebControllerMock) SetGeneralConfiguration(writer http.ResponseWriter, r *http.Request) {
92 writer.Header().Set("Content-Type", "application/json")
93 writer.WriteHeader(http.StatusOK)
98 func (c *NodebControllerMock) HealthCheckRequest(writer http.ResponseWriter, r *http.Request) {
99 writer.Header().Set("Content-Type", "application/json")
100 writer.WriteHeader(http.StatusOK)