public void Post_Valid_Test()
        {
            // Arrange
            PerformanceParameter performanceParameterObjAsInput = new PerformanceParameter();

            performanceParameterObjAsInput.sportId                = 1;
            performanceParameterObjAsInput.perfParaName           = new PerformanceParameterName();
            performanceParameterObjAsInput.perfParaName.id        = 1;
            performanceParameterObjAsInput.perfParaName.name      = "Parameter 1";
            performanceParameterObjAsInput.perfParaTypeGroup      = new PerformanceParameterTypeGroup();
            performanceParameterObjAsInput.perfParaTypeGroup.id   = 1;
            performanceParameterObjAsInput.perfParaTypeGroup.name = "Type 1";
            performanceParameterObjAsInput.customName             = "Custom 1";

            var mockRepository = new Mock <IPerformanceParameterRepository>();

            mockRepository.Setup(x => x.InsertPerformanceParameter(performanceParameterObjAsInput))
            .Returns(1);

            var controller = new PerformanceParameterController(mockRepository.Object);

            controller.Request       = new HttpRequestMessage();
            controller.Configuration = new HttpConfiguration();

            // Act
            HttpResponseMessage response = controller.Post(performanceParameterObjAsInput);

            // Assert
            string responseJSONStr = response.Content.ReadAsStringAsync().Result;
            string responseStr     = Helper.Deserialize <string>(responseJSONStr);

            Assert.IsNotNull(response);
            Assert.AreEqual(response.StatusCode, HttpStatusCode.OK);
            Assert.AreEqual(responseStr, "PerformanceParameter added successfully.");
        }
        public void Post_Null_Input_Test()
        {
            // Arrange
            var mockRepository = new Mock <IPerformanceParameterRepository>();

            var controller = new PerformanceParameterController(mockRepository.Object);

            controller.Request       = new HttpRequestMessage();
            controller.Configuration = new HttpConfiguration();

            // Act
            HttpResponseMessage response = controller.Post(null);

            // Assert
            string responseJSONStr = response.Content.ReadAsStringAsync().Result;
            string responseStr     = Helper.Deserialize <string>(responseJSONStr);

            Assert.IsNotNull(response);
            Assert.AreEqual(response.StatusCode, HttpStatusCode.NoContent);
            Assert.AreEqual(responseStr, "Invalid JSON Passed.");
        }