Package com.itextpdf.test
Class WrappedSamplesRunner
java.lang.Object
com.itextpdf.test.WrappedSamplesRunner
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidHelper method to construct error messages.protected abstract voidcomparePdf(String outPath, String dest, String cmp) Compares two PDF files using iText's CompareTool.static Collection<Object[]>static Collection<Object[]>generateTestsList(RunnerSearchConfig searchConfig) protected Stringprotected StringgetDest()Gets the path to the resulting PDF from the sample class;protected StringgetOutPath(String dest) protected static StringgetStringField(Class> c, String name) Returns a string value that is stored as a static variable inside an example class.protected voidCreates a Class object for the example you want to test.protected voidrunMain()void
-
Field Details
-
sampleClassParams
-
sampleClass
-
-
Constructor Details
-
WrappedSamplesRunner
public WrappedSamplesRunner()
-
-
Method Details
-
generateTestsList
-
generateTestsList
-
runSamples
- Throws:
-
Exception
-
comparePdf
Compares two PDF files using iText's CompareTool.- Parameters:
-
outPath- The path to the working folder where comparison results and temp files will be created -
dest- The PDF that resulted from the test -
cmp- The reference PDF - Throws:
-
Exception- If there is a problem opening the compare files
-
getDest
Gets the path to the resulting PDF from the sample class;- Returns:
- a path to a resulting PDF
-
getCmpPdf
-
getOutPath
-
getStringField
Returns a string value that is stored as a static variable inside an example class.- Parameters:
-
c- The example class -
name- The name of the variable - Returns:
- The value of the variable
-
initClass
protected void initClass()Creates a Class object for the example you want to test. -
addError
Helper method to construct error messages.- Parameters:
-
error- part of an error message.
-
runMain
-