Пример #1
0
        public Response<List<Resumes>> DisplayFiles(string filePath)
        {
           
                var repo = new FileRepository();

                var response = new Response<List<Resumes>>();

            try
            {
                response.Data = repo.GetFiles(filePath);
                if (response.Data != null)
                {
                    response.Success = true;
                    
                }
                else
                {
                    response.Success = false;
                    response.Message = "There are no files to display.";
                    
                }
            }
            catch (Exception ex)
            {
                response.Message = ex.Message;
                response.Success = false;
                
            }
            return response;


        }
Пример #2
0
 public void GetResumesTest()
 {
     var repo = new FileRepository();
     var filePath = @"C:\Users\Apprentice\Desktop\GitHub\KileyDowling\SGCorpHRV2\SGCorpHR\SGCorpHR.TEST\Resumes";
     var resumes = repo.GetFiles(filePath);
     var resume = resumes.First();
     Assert.AreEqual("TestResume.pdf", resume.FileName);
 }