2018-01-11 03:49:32 +08:00
namespace UglyToad.PdfPig.Tests.Integration
2018-01-08 04:19:17 +08:00
{
using Xunit ;
public class FarmerMacTests
{
private static string GetFilename ( )
{
2018-11-25 20:36:38 +08:00
return IntegrationHelpers . GetDocumentPath ( "FarmerMac.pdf" ) ;
2018-01-08 04:19:17 +08:00
}
[Fact]
public void HasCorrectNumberOfPages ( )
{
using ( var document = PdfDocument . Open ( GetFilename ( ) ) )
{
Assert . Equal ( 5 , document . NumberOfPages ) ;
}
}
[Fact]
public void HasCorrectContentAfterReadingPreviousPage ( )
{
using ( var document = PdfDocument . Open ( GetFilename ( ) ) )
{
// ReSharper disable once RedundantAssignment
var page = document . GetPage ( 1 ) ;
page = document . GetPage ( 2 ) ;
Assert . Contains ( "financial results for the fiscal quarter ended June 30, 2017 and (2) a conference call to discuss those results and Farmer Mac" , page . Text ) ;
}
}
}
}