64 references to DocumentAnnotationTestData
Microsoft.Extensions.Documents.Abstractions.Tests (64)
DocumentElementTests.cs (3)
196ExtractionDocumentSourceReference region = new(polygonOnly, DocumentAnnotationTestData.Polygon()); 209Assert.Equal(DocumentAnnotationTestData.Polygon(), region.Polygon); 239using DocumentAnnotationTestData.BorrowedNative native = new();
DocumentExtensionElementTests.cs (4)
64using DocumentAnnotationTestData.BorrowedNative nestedNative = new(); 68ExtractionDocumentSourceReference first = new(DocumentAnnotationTestData.PdfPage(), DocumentAnnotationTestData.Polygon(), attributes); 69ExtractionDocumentSourceReference second = new(new ExtractionDocumentSourcePage("frame-2", 2), DocumentAnnotationTestData.Polygon());
DocumentImageElementTests.cs (3)
90using DocumentAnnotationTestData.CountingStream stream = new(bytes); 98ExtractionDocumentSourcePage page = DocumentAnnotationTestData.PdfPage(); 100image.Sources.Add(new ExtractionDocumentSourceReference(page, DocumentAnnotationTestData.Polygon()));
DocumentReferencesTests.cs (17)
81using DocumentAnnotationTestData.BorrowedNative native = new(); 107using DocumentAnnotationTestData.BorrowedNative native = new(); 123ExtractionDocumentSourcePage page = DocumentAnnotationTestData.PdfPage(); 124using DocumentAnnotationTestData.BorrowedNative native = new(); 208ExtractionDocumentPoint[] supplied = DocumentAnnotationTestData.Polygon(); 209ExtractionDocumentSourcePage page = DocumentAnnotationTestData.PdfPage(); 219Assert.Equal(DocumentAnnotationTestData.Polygon(), region.Polygon); 233ExtractionDocumentSourceReference pdf = new(DocumentAnnotationTestData.PdfPage(), DocumentAnnotationTestData.Polygon()); 245Assert.Equal(DocumentAnnotationTestData.Polygon(), pdf.Polygon); 258ExtractionDocumentSourceReference region = new(page, DocumentAnnotationTestData.Polygon()); 261Assert.Equal(DocumentAnnotationTestData.Polygon(), region.Polygon); 272ExtractionDocumentSourceReference reference = new(page, DocumentAnnotationTestData.Polygon()); 276Assert.Equal(DocumentAnnotationTestData.Polygon(), reference.Polygon); 292ExtractionDocumentSourceReference valid = new(DocumentAnnotationTestData.PdfPage(), DocumentAnnotationTestData.Polygon()); 356ExtractionDocumentSourcePage page = DocumentAnnotationTestData.PdfPage();
DocumentTableCellCollectionTests.cs (13)
135ExtractionDocumentSourcePage page = DocumentAnnotationTestData.PdfPage(); 137ExtractionDocumentSourceReference cellSource = new(page, DocumentAnnotationTestData.Polygon()); 217Assert.Equal(DocumentAnnotationTestData.Polygon(), cellSource.Polygon); 389using DocumentAnnotationTestData.CountingStream stream = new(new byte[] { 1, 2, 3 }); 444using DocumentAnnotationTestData.CountingStream stream = new(new byte[] { 61, 62, 63 }); 502using DocumentAnnotationTestData.CountingStream stream = new(DocumentAnnotationTestData.OriginalBytes()); 503using DocumentAnnotationTestData.BorrowedNative native = new(); 505ExtractionDocumentSourcePage frame = DocumentAnnotationTestData.PdfPage(); 509oldAnchor.Sources.Add(new ExtractionDocumentSourceReference(frame, DocumentAnnotationTestData.Polygon())); 533Assert.Equal(DocumentAnnotationTestData.OriginalBytes(), stream.ToArray()); 584Assert.Equal(DocumentAnnotationTestData.Polygon(), oldAnchor.Sources[0].Polygon); 589Assert.Equal(DocumentAnnotationTestData.OriginalBytes(), stream.ToArray());
DocumentTableCellTests.cs (6)
119ExtractionDocumentSourcePage page = DocumentAnnotationTestData.PdfPage(); 121empty.Sources.Add(new ExtractionDocumentSourceReference(page, DocumentAnnotationTestData.Polygon())); 134Assert.Equal(DocumentAnnotationTestData.Polygon(), empty.Sources[0].Polygon); 156ExtractionDocumentSourcePage pdf = DocumentAnnotationTestData.PdfPage(); 166empty.Sources.Add(new ExtractionDocumentSourceReference(pdf, DocumentAnnotationTestData.Polygon())); 197Assert.Equal(DocumentAnnotationTestData.Polygon(), sources[0].Polygon);
DocumentTableElementTests.cs (3)
304ExtractionDocumentSourcePage frame = DocumentAnnotationTestData.PdfPage(); 306empty.Sources.Add(new ExtractionDocumentSourceReference(frame, DocumentAnnotationTestData.Polygon(), "NATIVE_ONLY")); 321Assert.Equal(DocumentAnnotationTestData.Polygon(), empty.Sources[0].Polygon);
DocumentTests.Composition.cs (2)
54using DocumentAnnotationTestData.CountingStream stream = new(new byte[] { 31, 32 }); 55using DocumentAnnotationTestData.BorrowedNative native = new();
DocumentTests.cs (11)
159ExtractionDocumentSourcePage page7 = DocumentAnnotationTestData.PdfPage(); 163ExtractionDocumentSourceReference region = new(page7, DocumentAnnotationTestData.Polygon()); 165text2.Sources.Add(new ExtractionDocumentSourceReference(page2, DocumentAnnotationTestData.Polygon())); 183Assert.Equal(DocumentAnnotationTestData.Polygon(), region.Polygon); 209using DocumentAnnotationTestData.CountingStream stream = new(DocumentAnnotationTestData.OriginalBytes()); 210using DocumentAnnotationTestData.BorrowedNative native = new(); 212ExtractionDocumentSourcePage page7 = DocumentAnnotationTestData.PdfPage(); 220Assert.Equal(DocumentAnnotationTestData.OriginalBytes(), stream.ToArray()); 236ExtractionDocumentSourcePage page = DocumentAnnotationTestData.PdfPage(); 239text.Sources.Add(new ExtractionDocumentSourceReference(page, DocumentAnnotationTestData.Polygon()));
DocumentTextElementTests.cs (2)
37ExtractionDocumentSourceReference citation = new(page, DocumentAnnotationTestData.Polygon()); 48Assert.Equal(DocumentAnnotationTestData.Polygon(), citation.Polygon);