Esempio n. 1
0
        public IEnumerable <Uri> GetProgramUris(Uri programUri)
        {
            if (programUri == null)
            {
                throw new ArgumentNullException("programUri");
            }
            if (!programUri.IsAbsoluteUri)
            {
                throw new ArgumentException("Only absolute URIs are supported.", "programUri");
            }

            var slug = _programSlugScraper.Scrape(programUri);

            return(_programUriScraper.Scrape(slug));
        }
 public void Scrape_NullSlug_ThrowsArgumentNullException()
 {
     // Act and assert
     Assert.Throws <ArgumentNullException>(() => _programUriScraper.Scrape(null));
 }