public void PostHoliday() { // Arrange HolidayController controller = new HolidayController(); Espl.Linkup.Domain.Leave.Holiday.Holiday HolidayObj = new Espl.Linkup.Domain.Leave.Holiday.Holiday { Title = "Christmas", WeekDay = "Sunday", HolidayType = "Fixed", HolidayDate = new DateTime() }; var actResult = controller.Post(HolidayObj); // Act var result = actResult as OkNegotiatedContentResult <Espl.Linkup.Domain.Leave.Holiday.Holiday>; // Assert Assert.IsNotNull(result); Assert.IsTrue(result.Content.ID > 0); }