52 references to new
Microsoft.Extensions.DocumentExtraction.Abstractions.Tests (2)
DocumentExtractionDocumentBuilderTests.cs (2)
126
expected.SourcePages.Add(new
ExtractionDocumentSourcePage
("blank", 2));
408
new
("pdf-frame", 7, new ExtractionDocumentPageDimensions(200, 100), ExtractionDocumentCoordinateUnit.Point, ExtractionDocumentCoordinateOrigin.BottomLeft);
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 (48)
DocumentAnnotationTestData.cs (1)
23
new
("urn:frame:pdf-A", 7, new ExtractionDocumentPageDimensions(200, 100),
DocumentElementTests.cs (10)
41
ExtractionDocumentSourcePage page =
new
("page-1", 1);
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));
194
ExtractionDocumentSourcePage dimensionsOnly =
new
("dimensions-only", 7, new ExtractionDocumentPageDimensions(200, 100));
195
ExtractionDocumentSourcePage polygonOnly =
new
("polygon-only", 2);
245
ExtractionDocumentSourcePage page =
new
("page", 1);
DocumentExtensionElementTests.cs (1)
69
ExtractionDocumentSourceReference second = new(new
ExtractionDocumentSourcePage
("frame-2", 2), DocumentAnnotationTestData.Polygon());
DocumentReferencesTests.cs (15)
80
ExtractionDocumentSourcePage page =
new
("unknown", 3);
100
Assert.Throws<ArgumentException>("polygon", () => new ExtractionDocumentSourceReference(
new
("page", 1), new ExtractionDocumentPoint[count]));
108
ExtractionDocumentSourcePage page =
new
("triangle", 1);
180
ExtractionDocumentSourcePage page =
new
("iterator", 1);
201
Assert.ThrowsAny<ArgumentException>(() => new
ExtractionDocumentSourcePage
(value!, 1));
239
ExtractionDocumentSourcePage rasterPage =
new
("urn:frame:raster-A", 7, new ExtractionDocumentPageDimensions(400, 200),
255
ExtractionDocumentSourcePage page =
new
("partial", 7, new ExtractionDocumentPageDimensions(200, 100),
270
ExtractionDocumentSourcePage page =
new
("no-size", 7, coordinateUnit: ExtractionDocumentCoordinateUnit.Point,
317
ExtractionDocumentSourcePage page =
new
("tiny", 1, positive);
343
Assert.Throws<ArgumentOutOfRangeException>("dimensions", () => new
ExtractionDocumentSourcePage
("empty", 1, dimensions));
345
ExtractionDocumentSourcePage unknown =
new
("unknown", 1, dimensions: null);
359
Assert.Throws<ArgumentOutOfRangeException>("pageNumber", () => new
ExtractionDocumentSourcePage
("frame", 0));
360
Assert.Throws<ArgumentOutOfRangeException>("dimensions", () => new
ExtractionDocumentSourcePage
("frame", 1, default(ExtractionDocumentPageDimensions)));
361
Assert.Throws<ArgumentOutOfRangeException>("coordinateUnit", () => new
ExtractionDocumentSourcePage
("frame", 1, coordinateUnit: (ExtractionDocumentCoordinateUnit)99));
362
Assert.Throws<ArgumentOutOfRangeException>("coordinateOrigin", () => new
ExtractionDocumentSourcePage
("frame", 1, coordinateOrigin: (ExtractionDocumentCoordinateOrigin)99));
DocumentReviewFollowUpTests.cs (6)
150
ExtractionDocumentSourcePage page =
new
("named-frame", null);
183
ExtractionDocumentSourcePage named =
new
("OneNote:Ideas", null);
184
ExtractionDocumentSourcePage seven =
new
("pdf:7", 7);
185
ExtractionDocumentSourcePage two =
new
("pdf:2", 2);
204
Assert.Throws<ArgumentOutOfRangeException>("pageNumber", () => new
ExtractionDocumentSourcePage
("frame", number));
235
() => new
ExtractionDocumentSourcePage
("frame", null, default(ExtractionDocumentPageDimensions)));
DocumentTableCellCollectionTests.cs (2)
390
text.Sources.Add(new(
new
("merged-page", 1), rawRepresentation: stream));
446
candidateText.Sources.Add(new(
new
("candidate-page", 1), rawRepresentation: stream));
DocumentTableCellTests.cs (1)
157
ExtractionDocumentSourcePage raster =
new
("raster-frame", 7, new ExtractionDocumentPageDimensions(400, 200),
DocumentTableElementTests.cs (3)
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)
57
ExtractionDocumentSourcePage page =
new
("frame", 4);
DocumentTests.cs (3)
160
ExtractionDocumentSourcePage page2 =
new
("urn:frame:page2", 2);
190
ExtractionDocumentSourcePage page =
new
("urn:frame:blank-page2", 2, new ExtractionDocumentPageDimensions(200, 100),
213
ExtractionDocumentSourcePage page2 =
new
("frame-2", 2);
DocumentTests.StandardContent.cs (1)
393
ExtractionDocumentSourcePage page =
new
("page", 1);
DocumentTextElementTests.cs (1)
35
ExtractionDocumentSourcePage page =
new
("citation-page", 7);
PreviewContractTests.cs (3)
83
ExtractionDocumentSourcePage named =
new
("Notebook:Ideas", null);
84
ExtractionDocumentSourcePage seven =
new
("physical:7", 7, new(200, 100),
86
ExtractionDocumentSourcePage blank =
new
("blank:2", 2);