Package com.inet.pdfc.junit
Class PdfcAssert
java.lang.Object
com.inet.pdfc.junit.PdfcAssert
A set of assertion methods to check two PDF files for equality.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidassertPdfEquals(File expected, File actual) Asserts that two pdf documents contain no differencesstatic voidassertPdfEquals(InputStream expected, InputStream actual) Asserts that two pdf documents given by their path contain no differences an AssertionFailedError is thrown with the given messagestatic voidassertPdfEquals(String message, File expected, File actual) Asserts that two pdf documents contain no differences an AssertionFailedError is thrown with the given messagestatic voidassertPdfEquals(String message, InputStream expected, InputStream actual) Asserts that two pdf documents given by their path contain no differences an AssertionFailedError is thrown with the given messagestatic voidassertPdfEquals(String expected, String actual) Asserts that two pdf documents given by their path contain no differencesstatic voidassertPdfEquals(String message, String expected, String actual) Asserts that two pdf documents given by their path contain no differences an AssertionFailedError is thrown with the given messagestatic voidassertPdfEquals(String message, URL expected, URL actual) Asserts that two pdf documents given by their path contain no differences an AssertionFailedError is thrown with the given messagestatic voidassertPdfEquals(String message, Path expected, Path actual) Asserts that two pdf documents given by their path contain no differences an AssertionFailedError is thrown with the given messagestatic voidassertPdfEquals(URL expected, URL actual) Asserts that two pdf documents given by their path contain no differences an AssertionFailedError is thrown with the given messagestatic voidassertPdfEquals(Path expected, Path actual) Asserts that two pdf documents given by their path contain no differencesstatic voidassertPdfNotEquals(File expected, File actual) Asserts that two pdf documents contain differencesstatic voidassertPdfNotEquals(String message, File expected, File actual) Asserts that two pdf documents contain differences an AssertionFailedError is thrown with the given messagestatic voidassertPdfNotEquals(String message, InputStream expected, InputStream actual) Asserts that two pdf documents given by their path contain no differences an AssertionFailedError is thrown with the given messagestatic voidassertPdfNotEquals(String expected, String actual) Asserts that two pdf documents given by their path contain differencesstatic voidassertPdfNotEquals(String message, String expected, String actual) Asserts that two pdf documents given by their path contain differences an AssertionFailedError is thrown with the given messagestatic voidassertPdfNotEquals(String message, Path expected, Path actual) Asserts that two pdf documents given by theirPathcontain differences an AssertionFailedError is thrown with the given messagestatic voidassertPdfNotEquals(Path expected, Path actual) Asserts that two pdf documents given by their path contain differencesstatic voidsetCredentials(String user, String password) Set the login credentials to login into the server.static voidsetLogLevel(int level) Set the log level of the client.static voidsetPdfcConfiguration(String configName) Defines the configuration for all subsequent calls of the assert APIstatic voidsetPdfcConfiguration(Properties settings) Defines the configuration for all subsequent calls of the assert APIstatic voidsetPdfcConfigurationWithName(String nameOrID) Set the compare profile with the name or id.static voidsetServicePath(String servicePath) Set the path to the PDFC server RPC application.
-
Constructor Details
-
PdfcAssert
public PdfcAssert()
-
-
Method Details
-
setPdfcConfiguration
Defines the configuration for all subsequent calls of the assert API- Parameters:
configName- the name/path of the configuration file. Anullvalue will reset the internal configuration to default.- Throws:
IOException- in case the designated file is not readable or not a valid XML file- Since:
- 3.0
-
setPdfcConfigurationWithName
Set the compare profile with the name or id. This profile should be for the login user available. The available names can you see at http://<pdfcserver:port>/pdfcapi/listconfig If it didn't found the profile it throw an exception with all user available configuration- Parameters:
nameOrID- name or id, case insensitive- Since:
- 3.0
-
setPdfcConfiguration
Defines the configuration for all subsequent calls of the assert API- Parameters:
settings- the configuration properties to be used- Since:
- 3.0
-
setServicePath
Set the path to the PDFC server RPC application. If not set multicast DNS is used to search the server. Possible values are:- myhost:9900
- myhost:9900/websocket
- http://myhost:9900
- http://myhost:9900/websocket
- Parameters:
servicePath- the path to the service- Since:
- 3.0
-
setLogLevel
public static void setLogLevel(int level) Set the log level of the client.- Parameters:
level- new level, once of the constant inLogger- Since:
- 3.0
-
setCredentials
Set the login credentials to login into the server.- Parameters:
user- the user namepassword- the password- Since:
- 3.0
-
assertPdfEquals
Asserts that two pdf documents contain no differences- Parameters:
expected- the pdf file with the expected contentactual- the pdf file with the actual content- Since:
- 3.0
-
assertPdfEquals
Asserts that two pdf documents contain no differences an AssertionFailedError is thrown with the given message- Parameters:
message- the message in case of a failexpected- the pdf file with the expected contentactual- the pdf file with the actual content- Since:
- 3.0
-
assertPdfEquals
Asserts that two pdf documents given by their path contain no differences- Parameters:
expected- the path of the pdf file with the expected contentactual- the path of the pdf file with the actual content- Since:
- 3.0
-
assertPdfEquals
Asserts that two pdf documents given by their path contain no differences an AssertionFailedError is thrown with the given message- Parameters:
message- the message in case of a failexpected- the path of the pdf file with the expected contentactual- the path of the pdf file with the actual content- Since:
- 3.0
-
assertPdfEquals
Asserts that two pdf documents given by their path contain no differences- Parameters:
expected- the path of the pdf file with the expected contentactual- the path of the pdf file with the actual content- Since:
- 3.0
-
assertPdfEquals
Asserts that two pdf documents given by their path contain no differences an AssertionFailedError is thrown with the given message- Parameters:
message- the message in case of a failexpected- the path of the pdf file with the expected contentactual- the path of the pdf file with the actual content- Since:
- 3.0
-
assertPdfEquals
Asserts that two pdf documents given by their path contain no differences an AssertionFailedError is thrown with the given message- Parameters:
expected- the URL of the pdf file with the expected contentactual- the URL of the pdf file with the actual content- Since:
- 3.0
-
assertPdfEquals
Asserts that two pdf documents given by their path contain no differences an AssertionFailedError is thrown with the given message- Parameters:
message- the message in case of a failexpected- the InputStream of the pdf file with the expected contentactual- the InputStream of the pdf file with the actual content- Since:
- 3.0
-
assertPdfEquals
Asserts that two pdf documents given by their path contain no differences an AssertionFailedError is thrown with the given message- Parameters:
expected- the InputStream of the pdf file with the expected contentactual- the InputStream of the pdf file with the actual content- Since:
- 3.0
-
assertPdfEquals
Asserts that two pdf documents given by their path contain no differences an AssertionFailedError is thrown with the given message- Parameters:
message- the message in case of a failexpected- the URL of the pdf file with the expected contentactual- the URL of the pdf file with the actual content- Since:
- 3.0
-
assertPdfNotEquals
Asserts that two pdf documents contain differences- Parameters:
expected- the pdf file with the expected contentactual- the pdf file with the actual content- Since:
- 3.0
-
assertPdfNotEquals
Asserts that two pdf documents contain differences an AssertionFailedError is thrown with the given message- Parameters:
message- the message in case of a failexpected- the pdf file with the expected contentactual- the pdf file with the actual content- Since:
- 3.0
-
assertPdfNotEquals
Asserts that two pdf documents given by their path contain differences- Parameters:
expected- the path of the pdf file with the expected contentactual- the path of the pdf file with the actual content- Since:
- 3.0
-
assertPdfNotEquals
Asserts that two pdf documents given by their path contain differences an AssertionFailedError is thrown with the given message- Parameters:
message- the message in case of a failexpected- the path of the pdf file with the expected contentactual- the path of the pdf file with the actual content- Since:
- 3.0
-
assertPdfNotEquals
Asserts that two pdf documents given by their path contain differences- Parameters:
expected- thePathof the pdf file with the expected contentactual- the path of the pdf file with the actual content- Since:
- 3.0
-
assertPdfNotEquals
Asserts that two pdf documents given by theirPathcontain differences an AssertionFailedError is thrown with the given message- Parameters:
message- the message in case of a failexpected- thePathof the pdf file with the expected contentactual- the path of the pdf file with the actual content- Since:
- 3.0
-
assertPdfNotEquals
Asserts that two pdf documents given by their path contain no differences an AssertionFailedError is thrown with the given message- Parameters:
message- the message in case of a failexpected- the InputStream of the pdf file with the expected contentactual- the InputStream of the pdf file with the actual content- Since:
- 3.0
-