public override async void OnNavigatedTo(NavigationParameters parameters) { Title = "Τύποι Προσόντων"; //TODO: Get Language from parameters //var language = parameters["language"]; var language = "el"; try { Qualifications.Clear(); var qualifications = QualificationAppService.GetQualificationsByCriteria(language, SearchSettings.LevelId, SearchSettings.BodyId, SearchSettings.SectorId, SearchSettings.TypeId, SearchSettings.Text); foreach (var qf in qualifications) { Qualifications.Add(qf); } base.OnNavigatedTo(parameters); } catch (Exception e) { //TODO: Find how to properly handle Exceptions await App.Current.MainPage.DisplayAlert("Error", $"Application was not able to retrieve qualifications: {e.Message}", "OK"); } }
public QualificationServiceTest() { //Mock _moqQualificationAppService = new Mock <IQualificationAppService>(); _moqQualificationQueries = new Mock <IQualificationQueries>(); _moqFileNetService = new Mock <IFileNetService>(); _NotificationService = new Mock <INotificationAppService>(); _Verification = new Mock <IVerificationService>(); _moqQualificationCommands = new Mock <IQualificationCommands>(); _moqMapper = new Mock <IMapper>(); _moqQualificationDomainService = new Mock <IQualificationDomainService>(); _moqHttpContextAccessor = new Mock <IHttpContextAccessor>(); _moqConfigurationRoot = new Mock <IConfigurationRoot>(); _moqGenericCommandRepository = new Mock <IGenericCommandRepository>(); _moqBlockAppService = new Mock <IBlockAppService>(); _moqTenderAppService = new Mock <ITenderAppService>(); _moqTenderQuereisService = new Mock <ITenderQueries>(); _moqTenderCommandsService = new Mock <ITenderCommands>(); _moqSupplierQualificationDocumentDomainService = new Mock <ISupplierQualificationDocumentDomainService>(); //Arrange _sut = new QualificationAppService(_NotificationService.Object, _moqQualificationQueries.Object, _moqQualificationCommands.Object, _Verification.Object, _moqQualificationDomainService.Object, _moqMapper.Object, _moqHttpContextAccessor.Object, _moqGenericCommandRepository.Object, _moqBlockAppService.Object, //configBuilder.Build(), _moqTenderAppService.Object, _moqTenderQuereisService.Object, _moqTenderCommandsService.Object, _moqSupplierQualificationDocumentDomainService.Object ); }