de.oio.jpdfunit
Interface MetaDataAssertion

All Known Subinterfaces:
DocumentAssertion
All Known Implementing Classes:
DocumentTester

public interface MetaDataAssertion

This interface provides the user many methods for accessing the meta data of a pdf document such as the author or the creation date. Even some general informtions can be accessed via this interface.

Author:
bbratkus

Method Summary
 void assertAuthorsNameEquals(String expected)
          The method compares the supposed authors name to the authors name of the pdf document.
 void assertCreationDateEquals(Calendar expected)
          The method comapares the supposed creation date to the creation date of the document.
 void assertCreatorEquals(String expected)
          The method compares the supposed creator to the creator of the document.
 void assertDecryptionWithOwnerPasswd(String expected)
          The method compares the supposed owner password with the owner password if it exists of the document and trys to decrypt the document.
 void assertDecryptionWithUserPasswd(String expected)
          The method compares the supposed user password with the user password if it exists of the document and trys to decrypt the document.
 void assertDocumentTitleEquals(String expected)
          The method comapares the supposed document title of the document informations with the document title of the document.
 void assertEncryptionLenghthEquals(int expected)
          The method compares the supposed encryption length with the encryption length of the document if it is encrypted else it returns 0.
 void assertIsDocumentEncrypted(boolean expected)
          The method checks if the current document is encrypted and comapares it to the parameter.
 void assertIsOwnerPasswd(String expected)
          The method compares the supposed owner password with the owner password if it exists of the document.
 void assertIsUserPasswd(String expected)
          The method compares the supposed user password with the user password if it exists of the document.
 void assertKeywordsEquals(String expected)
          The method compares the supposed keywords to the keywords of the document informations of the document.
 void assertPageCountEquals(int expected)
          The method compares the supposed page number to the page number of the document.
 void assertSubjectEquals(String expected)
          The method compares the supposed subject to the subject of the document.
 void assertVersionEquals(float expected)
          The method compares the supposed version to the version of the document.
 

Method Detail

assertAuthorsNameEquals

void assertAuthorsNameEquals(String expected)
The method compares the supposed authors name to the authors name of the pdf document.

Parameters:
expected - The supposed authors name.

assertCreatorEquals

void assertCreatorEquals(String expected)
The method compares the supposed creator to the creator of the document.

Parameters:
expected - The supposed creator of the document.

assertCreationDateEquals

void assertCreationDateEquals(Calendar expected)
The method comapares the supposed creation date to the creation date of the document.

Parameters:
expected - The supposed creation date of the document

assertDecryptionWithOwnerPasswd

void assertDecryptionWithOwnerPasswd(String expected)
The method compares the supposed owner password with the owner password if it exists of the document and trys to decrypt the document.

Parameters:
expected - The supposed owner password. Used for changing properties of a pdf file like printing or editing permissions.

assertDecryptionWithUserPasswd

void assertDecryptionWithUserPasswd(String expected)
The method compares the supposed user password with the user password if it exists of the document and trys to decrypt the document.

Parameters:
expected - The supposed user password. Usually used for reading the pdf file.

assertDocumentTitleEquals

void assertDocumentTitleEquals(String expected)
The method comapares the supposed document title of the document informations with the document title of the document.

Parameters:
expected - The supposed title of the pdf file

assertEncryptionLenghthEquals

void assertEncryptionLenghthEquals(int expected)
The method compares the supposed encryption length with the encryption length of the document if it is encrypted else it returns 0.

Parameters:
expected - The supposed encryption length of the pdf file.

assertKeywordsEquals

void assertKeywordsEquals(String expected)
The method compares the supposed keywords to the keywords of the document informations of the document.

Parameters:
expected - The supposed keywords of the pdf file.

assertPageCountEquals

void assertPageCountEquals(int expected)
The method compares the supposed page number to the page number of the document.

Parameters:
expected - The supposed page count of the pdf file. The page count is 1-based.

assertSubjectEquals

void assertSubjectEquals(String expected)
The method compares the supposed subject to the subject of the document.

Parameters:
expected - The supposed subject of the pdf file.

assertVersionEquals

void assertVersionEquals(float expected)
The method compares the supposed version to the version of the document.

Parameters:
expected - The supposed version of the pdf file.

assertIsDocumentEncrypted

void assertIsDocumentEncrypted(boolean expected)
The method checks if the current document is encrypted and comapares it to the parameter.

Parameters:
expected - The expected boolean. It has to be set to "true" if you suggest that the pdf file is encrypted.

assertIsOwnerPasswd

void assertIsOwnerPasswd(String expected)
The method compares the supposed owner password with the owner password if it exists of the document.

Parameters:
expected - The supposed ownerpassword.

assertIsUserPasswd

void assertIsUserPasswd(String expected)
The method compares the supposed user password with the user password if it exists of the document.

Parameters:
expected - The supposed user password.


Copyright © 2011. All Rights Reserved.