Class TestLogger
- java.lang.Object
-
- de.hybris.platform.sap.sapordermgmtbol.transaction.util.TestLogger
-
public class TestLogger extends java.lang.ObjectImprove Readability of console output by indenting
-
-
Field Summary
Fields Modifier and Type Field Description static intMETHOD_LEVEL1 Level Indentation for test methodsstatic intROOT_LEVELNo Indentationstatic intSTEP_LEVEL2 Level Indentation for test steps in methods
-
Constructor Summary
Constructors Constructor Description TestLogger()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(java.lang.String entry)adds the String to the list considering the indentationvoidaddChildLevel(java.lang.String describe)Adds a describing line to the output and increases indentation afterwardsvoidaddEmptyLine()Add an empty line to the log.voidaddSiblingLevel(java.lang.String describe)Unindents, adds a describing line to the output and increases indentation afterwardsvoidappendToLastEntry(java.lang.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 Detail
-
ROOT_LEVEL
public static final int ROOT_LEVEL
No Indentation- See Also:
- Constant Field Values
-
METHOD_LEVEL
public static final int METHOD_LEVEL
1 Level Indentation for test methods- See Also:
- Constant Field Values
-
STEP_LEVEL
public static final int STEP_LEVEL
2 Level Indentation for test steps in methods- See Also:
- Constant Field Values
-
-
Method Detail
-
add
public boolean add(java.lang.String entry)
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
public void addChildLevel(java.lang.String describe)
Adds a describing line to the output and increases indentation afterwards- Parameters:
describe- describing line
-
addSiblingLevel
public void addSiblingLevel(java.lang.String describe)
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
public void appendToLastEntry(java.lang.String string)
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.
-
-