for (int ndx2 = 0; ndx2 < 3; ndx2++)
{
List<BaseProperty> theProps = new ArrayList<BaseProperty>(2);
theProps.add(getProperty(TreeImplTest.PROPERTIES.values()[ndx1]));
theProps.add(getProperty(TreeImplTest.PROPERTIES.values()[start + ndx2]));
Path aPathInTreeIII = PathImpl.newInstance(treeIII.getNamenode(), theProps);
pathsInTreeIII.add(aPathInTreeIII);
assertTrue(pathsTreeIII.contains(aPathInTreeIII));
}
}
// Can we verify that the paths in treeI are:
// [nTI, A, D], [nTI, A, E], [nTI, A, F],
// [nTI, B, G], [nTI, B, H], [nTI, B, I],
// [nTI, C, J], [nTI, C, K], [nTI, C, L]
List<Path> pathsInTreeI = new ArrayList<Path>(9);
for ( int ndx1 = TreeImplTest.PROPERTIES.A.ordinal();
ndx1 < TreeImplTest.PROPERTIES.C.ordinal() + 1;
ndx1++)
{
// 0 -> 3,4,5, 1 -> 6,7,8, 2 -> 9,10,11
int start = (ndx1 + 1) * 3;
for (int ndx2 = 0; ndx2 < 3; ndx2++)
{
List<BaseProperty> theProps = new ArrayList<BaseProperty>(2);
theProps.add(getProperty(TreeImplTest.PROPERTIES.values()[ndx1]));
theProps.add(getProperty(TreeImplTest.PROPERTIES.values()[start + ndx2]));
Path aPathInTreeI = PathImpl.newInstance(treeI.getNamenode(), theProps);
pathsInTreeI.add(aPathInTreeI);
assertTrue(pathsTreeI.contains(aPathInTreeI));
}
}