@DoNotObfuscate
public final class JavaScriptValidator
extends com.pdfunit.validators.AbstractValidator
Modifier | Constructor and Description |
---|---|
protected |
JavaScriptValidator(DocumentValidator backReference)
Creating a validator for a JavaScript that is associated to a field of an PDF formular.
|
Modifier and Type | Method and Description |
---|---|
JavaScriptValidator |
containing(java.lang.String expectedJS)
This method looks whether the JavaScript inside the current PDF-document contains the
string, given by the parameter.
|
JavaScriptValidator |
equalsTo(java.lang.String expectedContent)
This function compares the content given by the parameter with the JavaScript
inside the current PDF-document.
|
JavaScriptValidator |
equalsToSource(java.io.InputStream expectedJS)
This method reads the input given by the parameter and compares the content
to the JavaScript inside the current PDF document.
|
JavaScriptValidator |
equalsToSource(java.io.Reader expectedJS)
This method reads the input given by the parameter and compares the content
to the JavaScript inside the current PDF document.
|
JavaScriptValidator |
equalsToSource(java.lang.String fileName)
This method reads the file given by the parameter and compares the content
to the JavaScript inside the current PDF document.
|
JavaScriptValidator |
equalsToSourcen(java.io.File expectedJS)
This method reads the file given by the parameter and compares the content
to the JavaScript inside the current PDF document.
|
JavaScriptValidator |
hasJavaScript()
This method does what the name suggests.
|
protected JavaScriptValidator(DocumentValidator backReference)
@Guarded public JavaScriptValidator containing(java.lang.String expectedJS)
@Guarded public JavaScriptValidator equalsToSource(java.lang.String fileName)
@Guarded public JavaScriptValidator equalsToSourcen(java.io.File expectedJS)
@Guarded public JavaScriptValidator equalsToSource(java.io.Reader expectedJS)
@Guarded public JavaScriptValidator equalsToSource(java.io.InputStream expectedJS)
public JavaScriptValidator hasJavaScript()
@Guarded public JavaScriptValidator equalsTo(java.lang.String expectedContent)
The internal JavaScript and the expected JavaScript are always compared ignoring all whitespaces.
Copyright (C) PDFUnit.com. See here for license.