public void DeleteMonthlyWorkout() { //Arrange var saveInstance = new MonthlyWorkout() { Name = "TestMonthly", WeekFour = _testWeeklyWorkout, WeekOne = _testWeeklyWorkout, WeekThree = _testWeeklyWorkout, WeekTwo = _testWeeklyWorkout }; _testWorkout = _monthWorkoutService.InsertMonthlyWorkout(saveInstance, _testUser); //Act var countBefore = _monthWorkoutService.GetMonthlyWorkouts(_testUser).Count(); _monthWorkoutService .DeleteMonthlyWorkout(_testWorkout.Id, _testUser); var countAfter = _monthWorkoutService.GetMonthlyWorkouts(_testUser).Count(); //Assert Assert.AreNotEqual(countAfter, countBefore); }
public IActionResult Delete(int id) { _monthlyWorkoutService.DeleteMonthlyWorkout(id, _user); return(NoContent()); }