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