public void RemoveSuggestionTest() { var repo = new SuggestionRepository(); repo.RemoveFile(1); var suggestions = repo.GetAllSuggestions(); Assert.IsFalse(suggestions.Exists(s => s.SuggestionID == 1)); }
public void RemoveSuggestionTest() { var repo = new SuggestionRepository(); int suggestionID = 3; string filePath = @"C:\Users\Apprentice\Desktop\GitHub\KileyDowling\SGCorpHRV2\SGCorpHR\SGCorpHR.TEST\Suggestions\Suggestions.txt"; repo.RemoveFile(suggestionID, filePath); var suggestions = repo.GetAllSuggestions(filePath); Assert.IsFalse(suggestions.Exists(s => s.SuggestionID == 3)); }
public void DeleteSuggestions(int suggestionID, string filePath) { var repo = new SuggestionRepository(); var response = new Response<List<Suggestion>>(); repo.RemoveFile(suggestionID, filePath); try { response.Success = true; } catch (Exception ex) { response.Message = ex.Message; } }