public void InsertUpdateSLAValuesTest() { List <SLAValuesForSLA> slaValues = new List <SLAValuesForSLA>() { new SLAValuesForSLA() { ID = 1, ProfileID = 1, SLAID = 1, ReportingDate = new DateTime(2018, 9, 1), QuantityProcessed = 200, QuantityOutsideofSLA = 2 }, new SLAValuesForSLA() { ProfileID = 6, SLAID = 11, ReportingDate = new DateTime(2018, 9, 1), QuantityProcessed = 250, QuantityOutsideofSLA = 2 } }; //Arrange SLAValuesModel slas = new SLAValuesModel() { ProfileID = 1, SelectedYear = 2018, SelectedMonth = 9, SlaValues = slaValues }; //Act var result = (JsonResult)controller.SLAValues(slas); var res = result.Data as JsonResultReturn; //Assert Assert.AreEqual(true, res.Success); }