public async void CreateFestivalShouldCreateFestival(int festivalId, int customerId) { Festival expected = await _dbMock.Object.Festivals.FirstAsync(f => f.Id == festivalId); Festival actual = await _festivalService.CreateFestival(expected, customerId); Assert.Equal(expected, actual); }
private async void CreateFestival() { try { await _festivalService.CreateFestival(Festival, _customerId); _festivalService.Sync(); _navigationService.NavigateTo("FestivalInfo", Festival.Id); } catch (InvalidAddressException) { OpenValidationPopup("Er is een ongeldig adres ingevoerd, controleer of je minimaal een straat, postcode en plaats hebt."); } catch (EndDateEarlierThanStartDateException) { OpenValidationPopup("De einddatum moet later zijn dan de startdatum"); } catch (Exception e) { OpenValidationPopup($"Er is een fout opgetreden bij het toevoegen van het festival, de fout is: {e.GetType()}"); } }