Class TryTest

java.lang.Object
org.djutils.exceptions.TryTest

public class TryTest extends Object
Test the methods in the Try class.
Author:
Peter Knoppers
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected String
    value to test for change by execute() method.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    main(String[] args)
    Can we get our intermittent test result to show up without the JUnit test harness?
    protected void
    setResult(String newResult)
    setter for the value to be called from execute() method.
    void
    Test the assign methods in the Try class.
    void
    Test the execute methods in the Try class.
    void
    Test the fail methods in the Try class using Assignments.
    void
    Test the fail methods in the Try class using assignments with lambda functions.
    void
    Test the fail methods in the Try class using Executions.
    void
    Test the fail methods in the Try class using lambda executions.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • value

      protected String value
      value to test for change by execute() method.
  • Constructor Details

    • TryTest

      public TryTest()
  • Method Details

    • tryAssignTest

      @Test public void tryAssignTest() throws RuntimeException
      Test the assign methods in the Try class.
      Throws:
      RuntimeException - if that happens (uncaught); this test has failed.
    • setResult

      protected void setResult(String newResult)
      setter for the value to be called from execute() method.
      Parameters:
      newResult - String; the value to set
    • tryExecuteTest

      @Test public void tryExecuteTest() throws RuntimeException
      Test the execute methods in the Try class.
      Throws:
      RuntimeException - if that happens (uncaught); this test has failed.
    • tryFailTestAssignLambda

      @Test public void tryFailTestAssignLambda() throws RuntimeException
      Test the fail methods in the Try class using assignments with lambda functions.
      Throws:
      RuntimeException - if that happens (uncaught); this test has failed.
    • tryFailTestAssign

      @Test public void tryFailTestAssign() throws RuntimeException
      Test the fail methods in the Try class using Assignments.
      Throws:
      RuntimeException - if that happens (uncaught); this test has failed.
    • tryFailTestExecuteLambda

      @Test public void tryFailTestExecuteLambda() throws RuntimeException
      Test the fail methods in the Try class using lambda executions.
      Throws:
      RuntimeException - if that happens (uncaught); this test has failed.
    • tryFailTestExecute

      @Test public void tryFailTestExecute() throws RuntimeException
      Test the fail methods in the Try class using Executions.
      Throws:
      RuntimeException - if that happens (uncaught); this test has failed.
    • main

      public static void main(String[] args)
      Can we get our intermittent test result to show up without the JUnit test harness?
      Parameters:
      args - String[]; the command line arguments