Interface Mocks

All Known Implementing Classes:
EmptyMocks

public interface Mocks
Hooks to mock the engine that provide test doubles for offline unit testing of stacks.
  • Method Details

    • newResourceAsync

      Invoked when a new resource is created by the program.
      Parameters:
      args - arguments containing resource information
      Returns:
      A resource identifier and resource state. State can be either a POJO or a dictionary bag. The returned ID may be null for component resources.
    • callAsync

      default CompletableFuture<Map<String,Object>> callAsync(Mocks.CallArgs args)
      Invoked when the program needs to call a provider to load data (e.g., to retrieve an existing resource).

      Default implementation returns an empty map.

      Parameters:
      args - arguments containing call information
      Returns:
      the call invocation result, can be either a POCO or a dictionary bag.