Interface Snippet


public interface Snippet
Identical to Runnable but the run method can throw stuff.

Allows you to pass in arbitrary snippets of code in fluent interfaces.

See Assertions.assertThrown(Snippet) for an example.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    run()
    Run arbitrary code and optionally throw an exception.
  • Method Details

    • run

      void run() throws Throwable
      Run arbitrary code and optionally throw an exception.
      Throws:
      Throwable - Any throwable.