public Interview Update(Interview interview) { DbEntityEntry entry = _context.Entry(interview); entry.State = EntityState.Modified; _context.SaveChanges(); return interview; }
public Interview Update(Interview interview) { Validator.Validate(interview); var updateInterview = _interviewRepository.Update(interview); return updateInterview; }
public void Setup() { _interview = ObjectMother.GetInterview(); _mockRepository = new MockRepository(MockBehavior.Default); _interviewRepoMoq = _mockRepository.Create<IInterviewRepository>(); _service = new InterviewService(_interviewRepoMoq.Object); }
public Interview Create(Interview interview) { Validator.Validate(interview); var saveInterview = _interviewRepository.Save(interview); return saveInterview; }
public void CreateAValidInterviewDataInterviewTest() { Interview interview = new Interview(); interview.Local = "Ndd"; interview.Comment = "Qualquer coisa"; Validator.Validate(interview); }
public void CreateAValidInterviewsCandidateNullTest() { Interview interview = new Interview(); interview.Local = "Ndd"; interview.Comment = "Qualquer coisa"; interview.DataInterview = DateTime.Now; Validator.Validate(interview); }
public void Setup() { Database.SetInitializer(new DropCreateDatabaseAlways<ContextDb>()); _repository = new InterviewRepository(); _interview = ObjectMother.GetInterview(); using (var context = new ContextDb()) { context.Interviews.Add(_interview); context.SaveChanges(); } }
public static Interview GetInterview() { Interview interview = new Interview(); interview.Local = "Ndd"; interview.Comment = "Qualquer coisa"; interview.DataInterview = DateTime.Now; interview.Candidate = new Candidate() { Name = "Aprigio" }; return interview; }
public void Add(int id, string local, string date) { date = DateTime.Now.ToString(); var convertDate = Convert.ToDateTime(date).ToString("yy-mm-dd"); DateTime dt = DateTime.ParseExact(convertDate, "yy-mm-dd", CultureInfo.InvariantCulture); Interview interview = new Interview() { Id = id, Local = local, DataInterview = dt }; _interviewRepository.Add(interview, id, local, dt); }
public Interview Save(Interview interview) { var newInterview = _context.Interviews.Add(interview); _context.SaveChanges(); return newInterview; }
public void Setup() { _interview = ObjectMother.GetInterview(); }
public void CreateAValidInterviewLocalTest() { Interview interview = new Interview(); Validator.Validate(interview); }
public void CreateAValidInterviewCommentTest() { Interview interview = new Interview(); interview.Local = "Ndd"; Validator.Validate(interview); }
public void Add(Interview interview, int id, string local, DateTime date) { _interviews.Add(interview); }