Interface Mocks


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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,​java.lang.Object>> callAsync​(MockCallArgs args)
      Invoked when the program needs to call a provider to load data (e.g., to retrieve an existing resource).
      java.util.concurrent.CompletableFuture<Tuples.Tuple2<java.util.Optional<java.lang.String>,​java.lang.Object>> newResourceAsync​(MockResourceArgs args)
      Invoked when a new resource is created by the program.
    • Method Detail

      • newResourceAsync

        java.util.concurrent.CompletableFuture<Tuples.Tuple2<java.util.Optional<java.lang.String>,​java.lang.Object>> newResourceAsync​(MockResourceArgs args)
        Invoked when a new resource is created by the program.

        Returns:
        A tuple of 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

        java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,​java.lang.Object>> callAsync​(MockCallArgs args)
        Invoked when the program needs to call a provider to load data (e.g., to retrieve an existing resource).

        Returns:
        Invocation result, can be either a POCO or a dictionary bag.