Class AsciiDocPreviewTest
Unit test for functionalities related to AsciiDoc preview generation.
The AsciiDocPreviewTest class sets up and tears down the testing
environment for
working with AsciiDoc templates. It facilitates the integration and testing
of
AsciiDoc processing with a block macro extension for generating previews.
The key responsibilities of this class include:
- Initializing and configuring the Asciidoctor instance with the required block macro extension.
- Managing temporary directories and template files used for the previews.
- Cleaning up resources after test execution.
Methods:
setUp(): Initializes the testing environment and registers the block macro extension.tearDown(): Cleans up resources, ensuring the Asciidoctor instance is closed.
Fields:
templatePath: Path to the temporary AsciiDoc template used for preview generation.asciidoctor: Instance of Asciidoctor used for processing AsciiDoc templates.tempDir: Temporary directory used for creating and managing test artifacts.
Usage of this class is intended as a base class for more specific test implementations involving AsciiDoc preview functionality.
-
Constructor Summary
ConstructorsConstructorDescriptionUnit test base class for verifying AsciiDoc preview generation functionality. -
Method Summary
-
Constructor Details
-
AsciiDocPreviewTest
public AsciiDocPreviewTest()Unit test base class for verifying AsciiDoc preview generation functionality.
The
AsciiDocPreviewTestclass provides the necessary setup and teardown mechanisms for testing the integration of AsciiDoc preview functionality, including an AsciiDoc block macro extension for generating preview images.Responsibilities:
- Initializes
Asciidoctorinstance with block macro extension. - Manages a temporary directory used for testing AsciiDoc previews.
- Cleans up resources, such as the
Asciidoctorinstance, after test.
This class is intended to be extended by specific test implementations, such as
AsciiDocPreviewExtensionTest, to run and validate their respective tests. - Initializes
-