Extends Verify to allow verification of documents via GrapeCity Documents API.
Converts documents (pdf, docx, and xslx) to png for verification.
An GrapeCity License is required to use this tool.
https://nuget.org/packages/Verify.GrapeCity/
using VerifyTests;
public static class ModuleInitializer
{
[ModuleInitializer]
public static void Initialize()
{
VerifyGrapeCity.Initialize();
}
}
[Test]
public Task VerifyPdf()
{
return Verifier.VerifyFile("sample.pdf");
}
[Test]
public Task VerifyPdfStream()
{
return Verifier.Verify(File.OpenRead("sample.pdf"))
.UseExtension("pdf");
}
{
Title: ,
Author: ,
CreationDate: DateTimeOffset_1,
ModifyDate: DateTimeOffset_2,
Subject: ,
Keywords: ,
Creator: RAD PDF,
Producer: RAD PDF 3.9.0.0 - http://www.radpdf.com
}
Samples.VerifyPdf.01.verified.png:
[Test]
public Task VerifyExcel()
{
return Verifier.VerifyFile("sample.xlsx");
}
[Test]
public Task VerifyExcelStream()
{
return Verifier.Verify(File.OpenRead("sample.xlsx"))
.UseExtension("xlsx");
}
{
BuiltInDocumentProperties: {},
CustomDocumentProperties: {},
DefaultTableStyle: TableStyleMedium2,
EnableCalculation: true
}
Samples.VerifyExcel.01.verified.png:
[Test]
public Task VerifyWord()
{
return Verifier.VerifyFile("sample.docx");
}
[Test]
public Task VerifyWordStream()
{
return Verifier.Verify(File.OpenRead("sample.docx"))
.UseExtension("docx");
}
{
Pages: 1,
ApplicationName: Microsoft Office Word,
AplicationVersion: 16.0,
Company: ,
CreatedTime: DateTime_1,
Language: en-US,
Security: None,
RevisionNumber: 3,
DefaultFont: Liberation Serif
}
Samples.VerifyWord.01.verified.png:
Grapes designed by Ale Em from The Noun Project.