|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public static interface AssertLogger.LoglevelAssert
Provider for Assert based methods which throws appropriate Exceptions which it catches immediately and logs
it to the underlying Logger using the selected AssertLogger.Loglevel. This allows to output Exception based
stacktrace information without raising an Exception for any calling logic.
Therefore all functions of the AssertLogger.LoglevelAssert will return true, if the assertion has not failed. And it
returns false if the assertion has failed and an Exception was logged to the underlying Logger instance.
For usage examples see AssertLogger...
| Method Summary | |
|---|---|
boolean |
areEqual(Object object1,
Object object2)
Returns true if the given Objects are equal |
boolean |
areEqual(Object object1,
Object object2,
String message)
Returns true if the given Objects are equal |
void |
fails()
|
void |
fails(Exception cause)
|
void |
fails(String message)
|
void |
fails(String message,
Exception cause)
|
boolean |
isFalse(boolean expression)
Returns true if the given expression is false |
boolean |
isFalse(boolean expression,
String message)
Returns true if the given expression is false |
boolean |
isInterimTimeLowerThan(int durationLimit,
TimeUnit timeUnit,
DurationCapture durationCapture,
Object[] intervalKeys)
Returns true if the DurationCapture.getInterimTime(TimeUnit) is lower than the given duration limit. |
boolean |
isNotEmpty(Collection<?> collection)
Returns true if the given Collections is not null and not empty. |
boolean |
isNotEmpty(Collection<?> collection,
String message)
Returns true if the given Collections is not null and not empty. |
boolean |
isNotNull(Object object)
Returns true if the given Object is not null. |
boolean |
isNotNull(Object object,
Object... objects)
Returns true if all the given Objects are not null. |
boolean |
isNotNull(Object object,
String message)
Returns true if all the given Objects are not null. |
boolean |
isNotNull(String message,
Object object,
Object... objects)
Returns true if all the given Objects are not null. |
boolean |
isTrue(boolean expression)
Returns true if the given expression is true |
boolean |
isTrue(boolean expression,
String message)
Returns true if the given expression is true |
| Method Detail |
|---|
boolean isInterimTimeLowerThan(int durationLimit,
TimeUnit timeUnit,
DurationCapture durationCapture,
Object[] intervalKeys)
DurationCapture.getInterimTime(TimeUnit) is lower than the given duration limit.
durationLimit - timeUnit - TimeUnitdurationCapture - DurationCaptureintervalKeys -
Assert.isInterimTimeLowerThan(int, TimeUnit, DurationCapture, Object[]),
AssertLogger.LoglevelAssert
void fails(String message,
Exception cause)
message - cause - Assert.fails(),
AssertLogger.LoglevelAssertvoid fails(String message)
message - Assert.fails(),
AssertLogger.LoglevelAssertvoid fails(Exception cause)
cause - Assert.fails(Exception),
AssertLogger.LoglevelAssertvoid fails()
Assert.fails(),
AssertLogger.LoglevelAssert
boolean isNotNull(String message,
Object object,
Object... objects)
Objects are not null.
message - object - objects -
Assert.isNotNull(String, Object, Object, Object...),
AssertLogger.LoglevelAssert
boolean isNotNull(Object object,
String message)
Objects are not null.
object - message -
Assert.isNotNull(Object, String),
AssertLogger.LoglevelAssert
boolean isNotNull(Object object,
Object... objects)
Objects are not null.
object - objects -
Assert.isNotNull(Object, Object...),
AssertLogger.LoglevelAssertboolean isNotNull(Object object)
Object is not null.
object -
Assert.isNotNull(Object),
AssertLogger.LoglevelAssert
boolean isNotEmpty(Collection<?> collection,
String message)
Collections is not null and not empty.
message - collection -
Assert.isNotEmpty(Collection, String),
AssertLogger.LoglevelAssertboolean isNotEmpty(Collection<?> collection)
Collections is not null and not empty.
collection -
Assert.isNotEmpty(Collection),
AssertLogger.LoglevelAssert
boolean areEqual(Object object1,
Object object2,
String message)
Objects are equal
object1 - object2 - message -
Assert.areEqual(Object, Object, String),
AssertLogger.LoglevelAssert
boolean areEqual(Object object1,
Object object2)
Objects are equal
object1 - object2 -
Assert.areEqual(Object, Object),
AssertLogger.LoglevelAssert
boolean isFalse(boolean expression,
String message)
expression - message -
Assert.isFalse(boolean, String),
AssertLogger.LoglevelAssertboolean isFalse(boolean expression)
expression -
Assert.isFalse(boolean),
AssertLogger.LoglevelAssert
boolean isTrue(boolean expression,
String message)
expression - message -
Assert.isTrue(boolean, String),
AssertLogger.LoglevelAssertboolean isTrue(boolean expression)
expression -
Assert.isTrue(boolean),
AssertLogger.LoglevelAssert
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||