Esempio n. 1
0
        public void GivenXmlFile_WhenGetTop5ForClenliness_ThenReturnsTop5()
        {
            //arrange
            const string xmlFilePath          = @"Files\FHRS413en-GB.xml";
            var          listOfEstablishments = _foodStandardsService.GetEstablishmentListFromXml(xmlFilePath);

            //act
            var result = _foodStandardsService.GetTop5ForCleanliness(listOfEstablishments);

            //assert
            Assert.IsType <List <EstablishmentDetail> >(result);
            Assert.Equal(5, result.Count);
        }
Esempio n. 2
0
        public IActionResult GetTop5()
        {
            var result = _foodStandardsService.GetTop5ForCleanliness(_establishmentList);

            return(Content(JsonConvert.SerializeObject(result)));
        }