public void SelectorsExtraction(string css, IEnumerable<string> expectedSelectors)
        {
            //Arrange

            //Act
            var stylesheet = new CssStylesheet(null, css );

            //Assert
            CollectionAssert.AreEquivalent(expectedSelectors, stylesheet.Selectors.Select(z => z.RawSelector));
        }
        public void ImportUrlsExtractions(string css, IEnumerable<string> importUrls)
        {
            //Arrange

            //Act
            var styleSheet = new CssStylesheet(null, css);

            //Assert
            CollectionAssert.AreEquivalent(importUrls,styleSheet.Imports);
        }
		public async Task<CssStylesheet> GetOrDownload(Uri url)
		{
			CssStylesheet stylesheet;

			if (_stylesheets.TryGetValue(url, out stylesheet)) 
				return stylesheet;

			var css = await WebClientHelper.DownloadStringAsync(url);

			stylesheet = new CssStylesheet(url, css);
			
			_stylesheets.TryAdd(url, stylesheet);

			return stylesheet;
		}