Skip to content

Commit

Permalink
fix: use wiki as page provider
Browse files Browse the repository at this point in the history
  • Loading branch information
SonicGD committed Oct 30, 2024
1 parent 9dacdf2 commit 6ae97a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/Sitko.Core.Pdf.Tests/PdfTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ public async Task Url()
var scope = await GetScopeAsync();
var renderer = scope.GetService<IPdfRenderer>();

var url = "https://github.com";
var url = "https://www.wikipedia.org/";
var bytes = await renderer.GetPdfByUrlAsync(url);
Assert.NotEmpty(bytes);

using var pdf = new PdfDocument(new PdfReader(new MemoryStream(bytes)));
var text = PdfTextExtractor.GetTextFromPage(pdf.GetPage(1), new LocationTextExtractionStrategy());
pdf.Close();

Assert.Contains("GitHub", text);
Assert.Contains("The Free Encyclopedia", text);
}

[Fact]
Expand Down

0 comments on commit 6ae97a6

Please sign in to comment.