Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class PatientService : IPatientService
- {
- private readonly IRestClient _restClient;
- private readonly IAppSettings _appSettings;
- public PatientService(IRestClient restClient, IAppSettings appSettings)
- {
- _restClient = restClient;
- _appSettings = appSettings;
- }
- public async Task<IList<PatientViewModel>> GetPatients(int wardId)
- {
- var url = _appSettings.Server + _appSettings.PatientServiceEndPoint + wardId;
- var token = _appSettings.Token;
- return GetPatientList(await _restClient.GetAsync<List<PatientInfo>>(url, token));
- }
- public IList<PatientViewModel> GetPatientList(IList<PatientInfo> patientInfoList)
- {
- return patientInfoList.Select(p => new PatientViewModel(p)).ToList();
- }
- }
- private readonly PatientListPageViewModel _patientListPageViewModel;
- private readonly Mock<IPatientService> _patient;
- public PatientServiceTests()
- {
- _patient = new Mock<IPatientService>();
- _patientListPageViewModel = new PatientListPageViewModel(_patient.Object);
- }
- [Fact]
- public void GetListByWard_PassingWardId_GetPatientsCountAccordingToWardId()
- {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement