57 references to new
Microsoft.Extensions.DocumentExtraction.Abstractions.Tests (2)
DocumentExtractionDocumentBuilderTests.cs (2)
114
ExtractionDocumentSourceReference reference =
new
(frame, Polygon());
172
ExtractionDocumentSourceReference reference =
new
(frame, vertices, native);
Microsoft.Extensions.DocumentExtraction.Tests (2)
DocumentExtractionMiddlewareTests.cs (2)
371
ExtractionDocumentSourceReference reference =
new
(new ExtractionDocumentSourcePage("frame", 7), rawRepresentation: native);
524
ExtractionDocumentSourceReference reference =
new
(new ExtractionDocumentSourcePage("frame", 7), rawRepresentation: native);
Microsoft.Extensions.Documents.Abstractions.Tests (53)
DocumentElementTests.cs (10)
42
ExtractionDocumentSourceReference first =
new
(page);
43
ExtractionDocumentSourceReference duplicate =
new
(page);
44
ExtractionDocumentSourceReference last =
new
(new("page-2", 2));
63
ExtractionDocumentSourceReference first =
new
(new("first", 1));
64
ExtractionDocumentSourceReference second =
new
(new("second", 2));
86
ExtractionDocumentSourceReference firstSource =
new
(new("first-page", 1), rawRepresentation: firstContent);
87
ExtractionDocumentSourceReference secondSource =
new
(new("second-page", 2), rawRepresentation: secondContent);
113
ExtractionDocumentSourceReference page =
new
(new("page-raw", 1));
196
ExtractionDocumentSourceReference region =
new
(polygonOnly, DocumentAnnotationTestData.Polygon());
249
element.Sources.Add(new
ExtractionDocumentSourceReference
(page, rawRepresentation: native));
DocumentExtensionElementTests.cs (2)
68
ExtractionDocumentSourceReference first =
new
(DocumentAnnotationTestData.PdfPage(), DocumentAnnotationTestData.Polygon(), attributes);
69
ExtractionDocumentSourceReference second =
new
(new ExtractionDocumentSourcePage("frame-2", 2), DocumentAnnotationTestData.Polygon());
DocumentImageElementTests.cs (1)
100
image.Sources.Add(new
ExtractionDocumentSourceReference
(page, DocumentAnnotationTestData.Polygon()));
DocumentReferencesTests.cs (15)
82
ExtractionDocumentSourceReference reference =
new
(page, empty ? Array.Empty<ExtractionDocumentPoint>() : null, native);
83
ExtractionDocumentSourceReference omitted =
new
(page);
100
Assert.Throws<ArgumentException>("polygon", () => new
ExtractionDocumentSourceReference
(new("page", 1), new ExtractionDocumentPoint[count]));
109
ExtractionDocumentSourceReference reference =
new
(page, points, native);
139
ExtractionDocumentSourceReference reference =
new
(page, EnumerateOnce(), native);
183
ExtractionDocumentSourceReference reference =
new
(page, EnumerateOnce());
190
Assert.Throws<ArgumentException>("polygon", () => new
ExtractionDocumentSourceReference
(page, EnumerateOnce()));
210
ExtractionDocumentSourceReference region =
new
(page, supplied);
233
ExtractionDocumentSourceReference pdf =
new
(DocumentAnnotationTestData.PdfPage(), DocumentAnnotationTestData.Polygon());
241
ExtractionDocumentSourceReference raster =
new
(rasterPage, expected);
258
ExtractionDocumentSourceReference region =
new
(page, DocumentAnnotationTestData.Polygon());
272
ExtractionDocumentSourceReference reference =
new
(page, DocumentAnnotationTestData.Polygon());
292
ExtractionDocumentSourceReference valid =
new
(DocumentAnnotationTestData.PdfPage(), DocumentAnnotationTestData.Polygon());
363
Assert.Throws<ArgumentNullException>("page", () => new
ExtractionDocumentSourceReference
(null!));
364
Assert.Throws<ArgumentException>("polygon", () => new
ExtractionDocumentSourceReference
(page, new[] { new ExtractionDocumentPoint(1, 2), new ExtractionDocumentPoint(3, 4) }));
DocumentReviewFollowUpTests.cs (2)
151
ExtractionDocumentSourceReference reference =
new
(page);
191
text.Sources.Add(
new
(named));
DocumentTableCellCollectionTests.cs (7)
137
ExtractionDocumentSourceReference cellSource =
new
(page, DocumentAnnotationTestData.Polygon());
138
ExtractionDocumentSourceReference firstSource =
new
(page, [new(1.25, 2.5), new(3.75, 2.5), new(1.25, 4.5)]);
139
ExtractionDocumentSourceReference imageSource =
new
(page, [new(5.25, 6.5), new(7.75, 6.5), new(5.25, 8.5)]);
140
ExtractionDocumentSourceReference lastSource =
new
(page, [new(9.25, 10.5), new(11.75, 10.5), new(9.25, 12.5)]);
390
text.Sources.Add(
new
(new("merged-page", 1), rawRepresentation: stream));
446
candidateText.Sources.Add(
new
(new("candidate-page", 1), rawRepresentation: stream));
509
oldAnchor.Sources.Add(new
ExtractionDocumentSourceReference
(frame, DocumentAnnotationTestData.Polygon()));
DocumentTableCellTests.cs (4)
121
empty.Sources.Add(new
ExtractionDocumentSourceReference
(page, DocumentAnnotationTestData.Polygon()));
136
empty.Sources.Add(new
ExtractionDocumentSourceReference
(page));
166
empty.Sources.Add(new
ExtractionDocumentSourceReference
(pdf, DocumentAnnotationTestData.Polygon()));
167
empty.Sources.Add(new
ExtractionDocumentSourceReference
(raster, rasterPolygon));
DocumentTableElementTests.cs (4)
306
empty.Sources.Add(new
ExtractionDocumentSourceReference
(frame, DocumentAnnotationTestData.Polygon(), "NATIVE_ONLY"));
342
table.Sources.Add(new
ExtractionDocumentSourceReference
(new ExtractionDocumentSourcePage("provider-page", 1), rawRepresentation: providerMarkdown));
365
table.Sources.Add(new
ExtractionDocumentSourceReference
(new ExtractionDocumentSourcePage("provider-page", 1), rawRepresentation: providerMarkdown));
388
table.Sources.Add(new
ExtractionDocumentSourceReference
(new ExtractionDocumentSourcePage("provider-page", 1), rawRepresentation: providerMarkdown));
DocumentTests.Composition.cs (1)
58
ExtractionDocumentSourceReference reference =
new
(page, rawRepresentation: native);
DocumentTests.cs (3)
163
ExtractionDocumentSourceReference region =
new
(page7, DocumentAnnotationTestData.Polygon());
165
text2.Sources.Add(new
ExtractionDocumentSourceReference
(page2, DocumentAnnotationTestData.Polygon()));
239
text.Sources.Add(new
ExtractionDocumentSourceReference
(page, DocumentAnnotationTestData.Polygon()));
DocumentTests.StandardContent.cs (1)
395
ExtractionDocumentSourceReference reference =
new
(page);
DocumentTextElementTests.cs (1)
37
ExtractionDocumentSourceReference citation =
new
(page, DocumentAnnotationTestData.Polygon());
PreviewContractTests.cs (2)
91
text.Sources.Add(
new
(named));
92
text.Sources.Add(
new
(seven, polygon));