Class TestLogger
java.lang.Object
de.hybris.platform.sap.sapordermgmtbol.transaction.util.TestLogger
Improve Readability of console output by indenting
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int1 Level Indentation for test methodsstatic final intNo Indentationstatic final int2 Level Indentation for test steps in methods -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanadds the String to the list considering the indentationvoidaddChildLevel(String describe) Adds a describing line to the output and increases indentation afterwardsvoidAdd an empty line to the log.voidaddSiblingLevel(String describe) Unindents, adds a describing line to the output and increases indentation afterwardsvoidappendToLastEntry(String string) append text to the last entry.voidindent()increase indentationvoidreset()Delete all entries.voidsetIndentLevel(int lvl) set specific indentation level.voidsysout()Prints all log entries to .voidunIndent()decrease indentation
-
Field Details
-
ROOT_LEVEL
public static final int ROOT_LEVELNo Indentation- See Also:
-
METHOD_LEVEL
public static final int METHOD_LEVEL1 Level Indentation for test methods- See Also:
-
STEP_LEVEL
public static final int STEP_LEVEL2 Level Indentation for test steps in methods- See Also:
-
-
Constructor Details
-
TestLogger
public TestLogger()
-
-
Method Details
-
add
adds the String to the list considering the indentation- Parameters:
entry- element to be appended to this list- Returns:
- true (as specified by Collection.add)
-
addChildLevel
Adds a describing line to the output and increases indentation afterwards- Parameters:
describe- describing line
-
addSiblingLevel
Unindents, adds a describing line to the output and increases indentation afterwards- Parameters:
describe- describing line
-
indent
public void indent()increase indentation -
unIndent
public void unIndent()decrease indentation -
setIndentLevel
public void setIndentLevel(int lvl) set specific indentation level.- Parameters:
lvl- Level of indentation
-
sysout
public void sysout()Prints all log entries to . -
appendToLastEntry
append text to the last entry.- Parameters:
string- text to append
-
addEmptyLine
public void addEmptyLine()Add an empty line to the log. -
reset
public void reset()Delete all entries.
-