public void UpdateResourceAvailability_Success() { // TODO: Fake engine? //AxisEngine engine = new AxisEngine(); //EngineContext.Replace(engine); // Create a resource availability first... var avail = controller.AddResourceAvailability(new ResourceAvailabilityViewModel() { AvailabilityStartTime = "0800", AvailabilityEndTime = "1600", Days = "Monday", FacilityID = 1, ResourceID = 1, ResourceTypeID = 1, ScheduleType = "Other", IsActive = false, ForceRollback = true }); var result = controller.UpdateResourceAvailability(new ResourceAvailabilityViewModel() { ResourceAvailabilityID = avail.ID, AvailabilityStartTime = "0800", AvailabilityEndTime = "1100", Days = "Tuesday", FacilityID = 1, ResourceID = 1, ResourceTypeID = 1, ScheduleType = "Other", IsActive = false, ForceRollback = true }); Assert.IsTrue(result != null, "Response can't be null"); Assert.IsTrue(result.ResultMessage == "executed successfully"); Assert.IsTrue(result.RowAffected == 0); }