#24 start adding classes for the acroform api

This commit is contained in:
Eliot Jones
2019-01-01 17:44:46 +00:00
parent 52b925489e
commit 20e843f5ae
9 changed files with 233 additions and 3 deletions

View File

@@ -0,0 +1,35 @@
namespace UglyToad.PdfPig.Tests.Integration
{
using System;
using Xunit;
public class AcroFormsBasicFieldsTests
{
private static string GetFilename()
{
return IntegrationHelpers.GetDocumentPath("AcroFormsBasicFields");
}
[Fact]
public void GetFormNotNull()
{
using (var document = PdfDocument.Open(GetFilename(), new ParsingOptions { UseLenientParsing = false }))
{
var form = document.GetForm();
Assert.NotNull(form);
}
}
[Fact]
public void GetFormDisposedThrows()
{
var document = PdfDocument.Open(GetFilename());
document.Dispose();
Action action = () => document.GetForm();
Assert.Throws<ObjectDisposedException>(action);
}
}
}