public void UpdateMonthlyWorkout() { //Arrange _testWorkout = _monthWorkoutService.GetMonthlyWorkouts(_testUser).FirstOrDefault(); //Act _testWorkout.Name = "Ultra kemény királyság"; _monthWorkoutService.UpdateMonthlyWorkout(_testWorkout.Id, _testWorkout); //Assert Assert.AreEqual(_monthWorkoutService .GetMonthlyWorkout(_testWorkout.Id, _testUser).Name, "Ultra kemény királyság"); }
public IActionResult Put(int id, [FromBody] MonthlyWorkout monthlyWorkout) { _monthlyWorkoutService.UpdateMonthlyWorkout(id, monthlyWorkout); return(NoContent()); }