public async Task <IActionResult> GetEstablishmentById(int establishmentId)
        {
            var establishmentDto = await _foodRatingProvider.GetEstablishmentById(establishmentId);

            var establishment = _mapper.Map <Establishment>(establishmentDto);

            return(Ok(establishment));
        }
Ejemplo n.º 2
0
        public async Task GetEstablishmentById_ReturnsOk()
        {
            // Arrange
            GetConfigAndMockedObjects();

            // Act
            var establishmentDto = await _foodRatingProvider.GetEstablishmentById(75064);

            // Assert
            Assert.True(establishmentDto.LocalAuthorityBusinessID.Equals("17437", StringComparison.CurrentCultureIgnoreCase));
        }