com.pdfunit.validators

## Class EmbeddedFileValidator

- java.lang.Object
- - com.pdfunit.validators.AbstractValidator
  - - com.pdfunit.validators.EmbeddedFileValidator

-     @DoNotObfuscate
      public final class EmbeddedFileValidator
      extends com.pdfunit.validators.AbstractValidator

  Validator for embedded files (== attachments) in PDF documents.
  Since:
    2016.05
  Author:
    Carsten Siedentop, February 2016

- - ### Field Summary

    - ### Fields inherited from class com.pdfunit.validators.AbstractValidator

      `testDocument`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `EmbeddedFileValidator(DocumentValidator documentValidator)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `EmbeddedFileValidator` | `hasEmbeddedFile()` This method does what the name suggests.
    `EmbeddedFileValidator` | `withContent(java.io.File expectedFilename)` Verifies that a file exists that has the same content as file, given by the parameter.
    `EmbeddedFileValidator` | `withContent(java.lang.String expectedFileName)` Verifies that a file exists that has the same content as value of the parameter.
    `EmbeddedFileValidator` | `withName(java.lang.String expectedFilename)` Verifies that a file exists with the name given by the parameter.

    - ### Methods inherited from class com.pdfunit.validators.AbstractValidator

      `closeDocument, equals, getDocument, hashCode`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### EmbeddedFileValidator

          protected EmbeddedFileValidator(DocumentValidator documentValidator)

  - ### Method Detail

    - #### hasEmbeddedFile

          public EmbeddedFileValidator hasEmbeddedFile()

      This method does what the name suggests.

    - #### withName

          @Guarded
          public EmbeddedFileValidator withName(java.lang.String expectedFilename)

      Verifies that a file exists with the name given by the parameter.

    - #### withContent

          @Guarded
          public EmbeddedFileValidator withContent(java.io.File expectedFilename)

      Verifies that a file exists that has the same content as file, given by the parameter.

    - #### withContent

          @Guarded
          public EmbeddedFileValidator withContent(java.lang.String expectedFileName)

      Verifies that a file exists that has the same content as value of the parameter.

Copyright (C) PDFUnit.com. See here for license.