Interface MocksConfig

All Known Implementing Classes:
MocksApi

public interface MocksConfig
Interface that defines helper configuration methods for helper operations. Validates that all required methods are implemented.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns and logs (at INFO level) a human-readable summary of all resolved configuration values.
    setAwaitMs(int awaitMs)
    Configures the global await timeout for assertions and operations that use await.
    setEnchantedReport(boolean enchantedReport)
    Enabling or disabling enchanted mockVerify report.
    setLogging(boolean enable)
    Enables or disables logging manually (debug log level will print logs anyway!).
    withAwaitMs(int awaitMs)
    Configure await for next assert with await (than await rollback to global).
  • Method Details

    • setAwaitMs

      MocksApi setAwaitMs(int awaitMs)
      Configures the global await timeout for assertions and operations that use await.
      Parameters:
      awaitMs - await timeout in milliseconds
      Returns:
      this
      Throws:
      IllegalArgumentException - if the provided timeout is invalid or less than 200 milliseconds
    • withAwaitMs

      MocksApi withAwaitMs(int awaitMs)
      Configure await for next assert with await (than await rollback to global).

      global setAwaitMs(int) will be ignored

      Parameters:
      awaitMs - ms await
      Returns:
      this instance for method chaining
      Throws:
      IllegalArgumentException - if the setup is invalid
    • setLogging

      MocksApi setLogging(boolean enable)
      Enables or disables logging manually (debug log level will print logs anyway!).
      Parameters:
      enable - true=request/response logging (Allure on always!)
      Returns:
      this instance for method chaining
    • setEnchantedReport

      MocksApi setEnchantedReport(boolean enchantedReport)
      Enabling or disabling enchanted mockVerify report.

      Same behavior as MockEnchantedDiffer.

      Parameters:
      enchantedReport - true=on/false=off
      Returns:
      this instance for method chaining
    • getConfigSummary

      String getConfigSummary()
      Returns and logs (at INFO level) a human-readable summary of all resolved configuration values.

      The summary includes values loaded from the YAML configuration file as well as any fields overridden programmatically after construction. Optional fields that were not present in the configuration and resolved via default values may also be included.

      Returns:
      String with summary