diff --git a/src/UglyToad.PdfPig.Tests/Integration/GithubIssuesTests.cs b/src/UglyToad.PdfPig.Tests/Integration/GithubIssuesTests.cs index 14cd5f5a..0fb47f01 100644 --- a/src/UglyToad.PdfPig.Tests/Integration/GithubIssuesTests.cs +++ b/src/UglyToad.PdfPig.Tests/Integration/GithubIssuesTests.cs @@ -102,8 +102,10 @@ { var path = IntegrationHelpers.GetSpecificTestDocumentPath("Hang.pdf"); - var ex = Assert.Throws(() => PdfDocument.Open(path, new ParsingOptions() { UseLenientParsing = true })); - Assert.StartsWith("Could not locate object with reference:", ex.Message); + using var doc = PdfDocument.Open(path, new ParsingOptions { UseLenientParsing = true }); + + var ex = Assert.Throws(() => doc.GetPage(1)); + Assert.StartsWith("Could not find", ex.Message); } [Fact]