public void GetSites() { IPdbApiService pdbApiService = new PdbApiService(pdbApiServiceLogger, pdbApiOptions); var resultList = pdbApiService.GetSites(); resultList.Should().NotBeNull(); resultList.Count.Should().BeGreaterThan(0); resultList.First(x => x.Sitename.Equals(Sitename)).Id.Should().Be(606, "Site should be found in results searched by sitename."); resultList.First(x => x.Id == 606).Sitename.Should().Be("5KPorn", "Site should be found in results searched by id."); }
public void GetVideos() { IPdbApiService pdbApiService = new PdbApiService(pdbApiServiceLogger, pdbApiOptions); var sites = pdbApiService.GetSites(); sites.Should().NotBeNull(); var site = sites.First(x => x.Sitename.Equals(Sitename)); var videos = pdbApiService.GetVideosBySite(site); videos.Should().NotBeNull(); videos.Count.Should().BeGreaterThan(0); var videoMishaMaver = videos.FirstOrDefault(x => x.Title.Contains("Misha Maver")); videoMishaMaver.Should().NotBeNull(); videoMishaMaver?.Site.Should().NotBeNull(); videoMishaMaver?.Site.Id.Should().Be(site.Id); videoMishaMaver?.Id.Should().BeGreaterThan(0); videoMishaMaver?.Title.Should().Be("Misha Maver"); videoMishaMaver?.Actors.Should().NotBeNull(); videoMishaMaver?.Actors.Should().HaveCountGreaterThan(0); videoMishaMaver?.Actors?.First().Actorname.Should().Be("Misha Maver"); }