Beispiel #1
0
        public IEnumerable <BrandBoardGroup> Get()
        {
            string path = "./Brands.csv";

            if (!System.IO.File.Exists(path))
            {
                throw new UserFriendlyException("CouldNotFindTheMappingFile");
            }
            var items = CSVHelper.ReadFromCSV <BrandBoardItem>(path);

            return(GroupBrandData(items));
        }
Beispiel #2
0
        public void Get_ReturnsAViewResult_WithAListOfBrandNameAndLogoURL()
        {
            // Arrange
            string path = "./Brands.csv";
            // Act

            var items = CSVHelper.ReadFromCSV <BrandBoardItem>(path);

            // Assert
            Assert.Equal(91, items.Count());
            Assert.Equal("Thompson's 汤普森", items.First().BrandName);
            Assert.Equal("https://worldcloudshops-ssl.cdn.aladdin.nz/media/manufacturer/9.png", items.First().BrandURL);
        }