Skip to content
This repository has been archived by the owner on Mar 10, 2022. It is now read-only.

Extends Verify to allow verification of documents via GrapeCity Documents.

License

Notifications You must be signed in to change notification settings

VerifyTests/Verify.GrapeCity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Verify.GrapeCity

Build status NuGet Status

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.

NuGet package

https://nuget.org/packages/Verify.GrapeCity/

Usage

Enable Verify.GrapeCity

using VerifyTests;

public static class ModuleInitializer
{
    [ModuleInitializer]
    public static void Initialize()
    {
        VerifyGrapeCity.Initialize();
    }
}

snippet source | anchor

PDF

Verify a file

[Test]
public Task VerifyPdf()
{
    return Verifier.VerifyFile("sample.pdf");
}

snippet source | anchor

Verify a Stream

[Test]
public Task VerifyPdfStream()
{
    return Verifier.Verify(File.OpenRead("sample.pdf"))
        .UseExtension("pdf");
}

snippet source | anchor

Result

{
  Title: ,
  Author: ,
  CreationDate: DateTimeOffset_1,
  ModifyDate: DateTimeOffset_2,
  Subject: ,
  Keywords: ,
  Creator: RAD PDF,
  Producer: RAD PDF 3.9.0.0 - http://www.radpdf.com
}

snippet source | anchor

Samples.VerifyPdf.01.verified.png:

Excel

Verify a file

[Test]
public Task VerifyExcel()
{
    return Verifier.VerifyFile("sample.xlsx");
}

snippet source | anchor

Verify a Stream

[Test]
public Task VerifyExcelStream()
{
    return Verifier.Verify(File.OpenRead("sample.xlsx"))
        .UseExtension("xlsx");
}

snippet source | anchor

Result

{
  BuiltInDocumentProperties: {},
  CustomDocumentProperties: {},
  DefaultTableStyle: TableStyleMedium2,
  EnableCalculation: true
}

snippet source | anchor

Samples.VerifyExcel.01.verified.png:

Word

Verify a file

[Test]
public Task VerifyWord()
{
    return Verifier.VerifyFile("sample.docx");
}

snippet source | anchor

Verify a Stream

[Test]
public Task VerifyWordStream()
{
    return Verifier.Verify(File.OpenRead("sample.docx"))
        .UseExtension("docx");
}

snippet source | anchor

Result

{
  Pages: 1,
  ApplicationName: Microsoft Office Word,
  AplicationVersion: 16.0,
  Company: ,
  CreatedTime: DateTime_1,
  Language: en-US,
  Security: None,
  RevisionNumber: 3,
  DefaultFont: Liberation Serif
}

snippet source | anchor

Samples.VerifyWord.01.verified.png:

File Samples

http://file-examples.com/

Icon

Grapes designed by Ale Em from The Noun Project.

About

Extends Verify to allow verification of documents via GrapeCity Documents.

Resources

License

Code of conduct

Stars

Watchers

Forks

Languages