internal void crcPdf(Action <DocumentCatalog> Given, Action <DocumentCatalog> When = null, Action <DocumentCatalog> Then = null) { DocumentCatalog pdfWriter = Pdf.CreateExpert(); Given(pdfWriter); MemoryStream ms = new MemoryStream(); pdfWriter.Save(ms); LogInDebug(ms); ms.Seek(0, SeekOrigin.Begin); DocumentCatalog pdfRead = Pdf.Load(ms); if (When != null) { When(pdfRead); } if (Then != null) { Then(pdfRead); } }
private CaseController() { caseCatalog = new CaseCatalog(); adCatalog = new AdCatalog(); askingPriceCatalog = new AskingPriceCatalog(); distanceToCatalog = new DistanceToCatalog(); documentCatalog = new DocumentCatalog(); pictureCatalog = new PictureCatalog(); ratingCatalog = new RatingCatalog(); }
public void APathOperatorMustBeFollowedByPaintOperators() { DocumentCatalog pdf = Pdf.CreateExpert(); Action act = () => pdf.Pages .AddPage() .AddRectangle(10, 10, 12, 14.5f) .SetLineCap(LineCapStyle.ButtCap) .AddStroke(); act.Should().Throw <PdfException>() .WithMessage("INVALID_OPERATOR: A Path Painting Operator must appear after a Path Construction Operator or another Path Painting Operator"); }
internal void crcPdfShould(byte[] Given, Action <DocumentCatalog> When = null, Action <DocumentCatalog> Then = null) { DocumentCatalog pdf = Pdf.Load(new MemoryStream(Given)); if (When != null) { When(pdf); } if (Then != null) { Then(pdf); } }