public void H_DeleteWorkoutTest() { var workout = wcRepository.GetAll().Where(x => x.workout_title.Equals("TestRepositoryWorkout", StringComparison.InvariantCultureIgnoreCase)) .FirstOrDefault(); if (workout != null) { wcRepository.DeleteWorkout(workout); _context.SaveChanges(); var result = wcRepository.GetWorkout(workout.workout_id); Assert.AreEqual(null, result); } }
public void DeleteWorkout(workout_collection wc) { workoutCollectionRepository.DeleteWorkout(wc); unitOfWork.Commit(); }