org.omnaest.utils.assertion
Interface AssertLogger.DirectAssertHandler

All Superinterfaces:
AssertLogger.DirectAssertHandlerMessageChoice, AssertLogger.DirectAssertResultValueProvider, AssertLogger.DirectAssertSuccessFailureChoice, Serializable
Enclosing class:
AssertLogger

public static interface AssertLogger.DirectAssertHandler
extends AssertLogger.DirectAssertResultValueProvider, Serializable, AssertLogger.DirectAssertHandlerMessageChoice, AssertLogger.DirectAssertSuccessFailureChoice

Handler of an assertion result which allows to throw Exceptions or log messages

Author:
Omnaest

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.omnaest.utils.assertion.AssertLogger.DirectAssertHandlerMessageChoice
AssertLogger.DirectAssertHandlerMessageChoice.LogLevel
 
Method Summary
 AssertLogger.DirectAssertHandler logAs(AssertLogger.DirectAssertHandlerMessageChoice.LogLevel logLevel)
          Logs the assertion Exception using the given AssertLogger.DirectAssertHandlerMessageChoice.LogLevel
 void throwException()
          Throws an Exception triggered by the previous assertion
 void throwException(Exception exception)
          Throws the given Exception with the assertion as cause
 void throwException(RuntimeException runtimeException)
          Throws the given RuntimeException with the assertion as cause
 void throwException(Throwable throwable)
          Throws the given Throwable with the assertion as cause
 void throwRuntimeException()
          Throws a RuntimeException triggered by the previous assertion
 
Methods inherited from interface org.omnaest.utils.assertion.AssertLogger.DirectAssertResultValueProvider
getAssertResult
 
Methods inherited from interface org.omnaest.utils.assertion.AssertLogger.DirectAssertHandlerMessageChoice
logWithMessage, logWithMessage
 
Methods inherited from interface org.omnaest.utils.assertion.AssertLogger.DirectAssertSuccessFailureChoice
onFailure, onSuccess
 

Method Detail

throwException

void throwException()
                    throws Exception
Throws an Exception triggered by the previous assertion

Throws:
Exception

throwRuntimeException

void throwRuntimeException()
Throws a RuntimeException triggered by the previous assertion


throwException

void throwException(RuntimeException runtimeException)
Throws the given RuntimeException with the assertion as cause

Parameters:
runtimeException -
Throws:
RuntimeException

throwException

void throwException(Exception exception)
                    throws Exception
Throws the given Exception with the assertion as cause

Parameters:
exception -
Throws:
Exception

throwException

void throwException(Throwable throwable)
                    throws Throwable
Throws the given Throwable with the assertion as cause

Parameters:
throwable -
Throws:
Throwable

logAs

AssertLogger.DirectAssertHandler logAs(AssertLogger.DirectAssertHandlerMessageChoice.LogLevel logLevel)
Logs the assertion Exception using the given AssertLogger.DirectAssertHandlerMessageChoice.LogLevel

Parameters:
logLevel - AssertLogger.DirectAssertHandlerMessageChoice.LogLevel
Returns:


Copyright © 2013. All Rights Reserved.