java.lang.Object
it.tidalwave.datamanager.application.nogui.Holder<T>

public class Holder<T> extends Object
Mocking classes with fluent-style methods is complex because the mock must be deep; and in any case that approach is heavily limited since we can only verify invocations on the last instance. Here the approach is different: the object with fluent-style methods is referred by a holder, which contains a mutable reference that is always updated with the last instance.
Author:
Fabrizio Giudici
  • Field Details

    • f

      public T f
  • Constructor Details

    • Holder

      public Holder()
  • Method Details

    • of

      public static <S> Holder<S> of(@Nonnull Function<Holder<S>,S> function)
    • set

      public void set(@Nonnull T instance)