public void Show_feedback() { using (var context = new MyDbContext(_options)) { SetupDatabase(context); HospitalApp.Services.FeedbackService service = new HospitalApp.Services.FeedbackService(context); FeedbackDto feedback = service.ShowFeedback(1); feedback.IsVisible.ShouldBe(true); } }
public void Get_by_id() { using (var context = new MyDbContext(_options)) { SetupDatabase(context); HospitalApp.Services.FeedbackService service = new HospitalApp.Services.FeedbackService(context); FeedbackDto feedback = service.GetById(1); feedback.Id.ShouldBe(1); } }
public void Get_visible_feedbacks() { using (var context = new MyDbContext(_options)) { SetupDatabase(context); HospitalApp.Services.FeedbackService service = new HospitalApp.Services.FeedbackService(context); List <FeedbackDto> visibleFeedbacks = service.GetVisibleFeedbacks(); visibleFeedbacks.Count.ShouldBe(1); } }
public void Get_all_feedbacks() { using (var context = new MyDbContext(_options)) { SetupDatabase(context); HospitalApp.Services.FeedbackService service = new HospitalApp.Services.FeedbackService(context); List <FeedbackDto> feedbacks = service.GetAll(); feedbacks.Count.ShouldBeGreaterThanOrEqualTo(2); } }