class RemapTestDriver1
extends java.lang.Object
DirectoryService
, adds a number of nodes and
performs operations with them.
WARNING: THIS IS A TEST APPLICATION! UNDER NO CIRCUMSTANCES IT SHOULD BE INVOKED AGAINST PRODUCTION DIRECTORY BECAUSE THIS WILL CAUSE SEVERE DAMAGE OF THE DIRECTORY AND LOSS OF IMPORTANT SECURITY DATA!!!
Modifier and Type | Field and Description |
---|---|
private static int |
failed
Total number of failed tests.
|
private static int |
tests
Total number of performed tests.
|
Constructor and Description |
---|
RemapTestDriver1() |
Modifier and Type | Method and Description |
---|---|
private static boolean |
cmp(byte[] one,
byte[] two)
Compare two byte arrays.
|
static void |
main(java.lang.String[] args)
Main application entry point.
|
private static void |
prc(java.lang.String text,
boolean rc,
boolean expected)
Print text and operation result code.
|
private static void |
printArray(java.lang.Object[] arr)
Print provided array into stdout
|
private static void |
printReport()
Print testing summary report.
|
private static void |
printSubtree(java.lang.String nodeId)
Print directory tree.
|
private static void |
pruneSubtree(java.lang.String nodeId)
Remove entire subtree.
|
private static int failed
private static int tests
private static void prc(java.lang.String text, boolean rc, boolean expected)
text
- Text banner for the test.rc
- Actual resultexpected
- Expected resultprivate static void printArray(java.lang.Object[] arr)
arr
- Array to print.private static void printReport()
private static void printSubtree(java.lang.String nodeId)
nodeId
- Root of the subtree which will be removed.private static void pruneSubtree(java.lang.String nodeId)
nodeId
- Root of the subtree which will be removed.private static boolean cmp(byte[] one, byte[] two)
one
- First array to compare.two
- Second array to compare.true
if arrays are equal (i.e. have identical
number of elements and all elements are equal).public static void main(java.lang.String[] args) throws ConfigurationException
args
- Application command line parameters.ConfigurationException
- forwarded from BootstrapConfig
constructor.