public void Put_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.Put(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.");
        }
        public void Put_Invalid_ParaTypeId_Test()
        {
            // Arrange
            PerformanceParameter performanceParameterObjAsInput = new PerformanceParameter();

            performanceParameterObjAsInput.id                     = 1;
            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.UpdatePerformanceParameter(performanceParameterObjAsInput))
            .Returns(true);

            var controller = new PerformanceParameterController(mockRepository.Object);

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

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

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

            Assert.IsNotNull(response);
            Assert.AreEqual(response.StatusCode, HttpStatusCode.PartialContent);
            Assert.AreEqual(responseStr, "Invalid Type Id passed.");
        }