2930313233343536
public class ResultTest { @Test public void createThrowResultToString() { final Exception e = new Exception("Error message"); final Result r = Result.createThrowResult(e); assertEquals("Answer throwing " + e, r.toString()); }
3637383940414243
} @Test public void createReturnResultToString() { final String value = "My value"; final Result r = Result.createReturnResult(value); assertEquals("Answer returning " + value, r.toString()); }
4344454647484950
} @Test public void createDelegateResultToString() { final String value = "my value"; final Result r = Result.createDelegatingResult(value); assertEquals("Delegated to " + value, r.toString()); }