Class DiagnosticTest
java.lang.Object
pro.verron.officestamper.DiagnosticTest
The DiagnosticTest class contains unit test methods to validate the behavior of the Diagnostic utility and ensure the correctness of its context generation capabilities. These tests cover properties such as report date, report user, environment variables, JVM properties, and user preferences. This class leverages JUnit test cases to test the Diagnostic.context() method under various conditions and scenarios, including default and custom configurations. Key test methods verify:
- The inclusion of a 'reportDate' field with the correct value.
- The presence and correctness of a 'reportUser' field.
- Validation of environment variables within the context.
- Validation of JVM properties within the context.
- Presence and validation of user preferences in the context.
- Custom context values provided through method parameters. Assertions are used throughout to ensure the context data matches expectations, utilizing both default values and custom-configured values for all supported fields.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
DiagnosticTest
public DiagnosticTest()Default constructor.
-