public async Task <IActionResult> GetAllPollingStations([FromQuery] PollingStationsFilter pollingStationsFilter)
        {
            var request = _mapper.Map <GetPollingStations>(pollingStationsFilter);

            var result = await _mediator.Send(request);

            return(Ok(result));
        }
Beispiel #2
0
        public void PollingStationsFilter_WhenMappingToGetPollingStations_ReturnsNonNull()
        {
            var pollingStationFilter = new PollingStationsFilter();

            var getPollingStations = _mapper.Map <GetPollingStations>(pollingStationFilter);

            getPollingStations.Should().NotBeNull();
        }
Beispiel #3
0
        public void PollingStationsFilter_WhenMappingToGetPollingStations_MapsPageSizeCorrectly()
        {
            var pollingStationFilter = new PollingStationsFilter
            {
                PageSize = 20
            };

            var getPollingStations = _mapper.Map <GetPollingStations>(pollingStationFilter);

            getPollingStations.PageSize.Should().Be(20);
        }
Beispiel #4
0
        public void PollingStationsFilter_WhenMappingToGetPollingStations_MapsIdCountyCorrectly()
        {
            var pollingStationFilter = new PollingStationsFilter
            {
                IdCounty = 15
            };

            var getPollingStations = _mapper.Map <GetPollingStations>(pollingStationFilter);

            getPollingStations.IdCounty.Should().Be(15);
        }