Skip to content

Commit

Permalink
ACS-5471: Secondary path support
Browse files Browse the repository at this point in the history
- fixes for PMD
  • Loading branch information
krdabrowski committed Sep 28, 2023
1 parent 57a761c commit 84bcee8
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public void dataPreparation()
}

@Test(groups = TestGroup.SEARCH)
public void testSecondaryAncestor_withNodeHavingOneSecondaryChild()
public void testSecondaryAncestorWithNodeHavingOneSecondaryChild()
{
// then
STEP("Verify that searching by ANCESTOR and folderM will find one descendant node: folderC.");
Expand All @@ -74,7 +74,7 @@ public void testSecondaryAncestor_withNodeHavingOneSecondaryChild()
}

@Test(groups = TestGroup.SEARCH)
public void testSecondaryAncestor_withNodeHavingTwoSecondaryChildren()
public void testSecondaryAncestorWithNodeHavingTwoSecondaryChildren()
{
// then
STEP("Verify that searching by ANCESTOR and folderC will find nodes: .");
Expand All @@ -89,7 +89,7 @@ public void testSecondaryAncestor_withNodeHavingTwoSecondaryChildren()
}

@Test(groups = TestGroup.SEARCH)
public void testSecondaryAncestor_withDocumentAsSecondaryChild()
public void testSecondaryAncestorWithDocumentAsSecondaryChild()
{
// then
STEP("Verify that searching by ANCESTOR and folderA will find nodes: .");
Expand All @@ -103,7 +103,7 @@ public void testSecondaryAncestor_withDocumentAsSecondaryChild()
}

@Test(groups = TestGroup.SEARCH)
public void testSecondaryAncestor_withNodeHavingComplexSecondaryRelationship()
public void testSecondaryAncestorWithNodeHavingComplexSecondaryRelationship()
{
// then
STEP("Verify that all descendant of folderX can be found.");
Expand Down Expand Up @@ -139,7 +139,7 @@ public void testSecondaryAncestor_withNodeHavingComplexSecondaryRelationship()
* </pre>
*/
@Test(groups = TestGroup.SEARCH)
public void testSecondaryAncestor_withDeletedSecondaryRelationship()
public void testSecondaryAncestorWithDeletedSecondaryRelationship()
{
// given
STEP("Add to folderQ a secondary child folderR and verify if it can be found using ANCESTOR index and secondary child node reference.");
Expand Down Expand Up @@ -181,7 +181,7 @@ public void testSecondaryAncestor_withDeletedSecondaryRelationship()
* </pre>
*/
@Test(groups = TestGroup.SEARCH)
public void testSecondaryAncestor_withDeletedSecondaryParentNode()
public void testSecondaryAncestorWithDeletedSecondaryParentNode()
{
// given
STEP("Create two nested folders (D and E) in Document Library.");
Expand Down Expand Up @@ -224,7 +224,7 @@ public void testSecondaryAncestor_withDeletedSecondaryParentNode()
* will update ANCESTOR index in ES.
*/
@Test(groups = TestGroup.SEARCH)
public void testSecondaryAncestor_withMovedSecondaryParentNode()
public void testSecondaryAncestorWithMovedSecondaryParentNode()
{
// given
STEP("Create folderD inside folderQ, and add folderP to D as a secondary child.");
Expand Down Expand Up @@ -286,7 +286,7 @@ public void testSecondaryAncestor_withMovedSecondaryParentNode()
* </pre>
*/
@Test(groups = TestGroup.SEARCH)
public void testSecondaryAncestor_withCopiedSecondaryParentNode()
public void testSecondaryAncestorWithCopiedSecondaryParentNode()
{
// given
STEP("Create nested folders (G and H) inside folderS and folderT in Document Library. Make folderP a secondary child of folderG.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ private static String getCmisLocation(Object pathMap, String name)
public class TestFolders extends HashMap<String, Folder> implements Folders

Check warning

Code scanning / PMD

The class 'TestFolders' might be a test class, but it contains no test cases. Warning test

The class 'TestFolders' might be a test class, but it contains no test cases.
{
/** Creates a folder in site's Document Library. */
@Override
public Folder createFolder(String folderSuffix)
{
Folder createdFolder = new Folder().createNestedFolders((Folder) null, folderSuffix).get(folderSuffix);
Expand All @@ -256,13 +257,15 @@ public Folder createFolder(String folderSuffix)
}

/** Creates multiple nested folders in site's Document Library. */
@Override
public Map<String, Folder> createNestedFolders(String... folderSuffixes)
{
Map<String, Folder> createdFolders = new Folder().createNestedFolders(null, folderSuffixes);
this.putAll(createdFolders);
return createdFolders;
}

@Override
public void delete(Folder folder)
{
folder.delete();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public void dataPreparation()
}

@Test(groups = TestGroup.SEARCH)
public void testSecondaryParent_withNodeHavingOneSecondaryChild()
public void testSecondaryParentWithNodeHavingOneSecondaryChild()
{
// then
STEP("Verify that searching rby PARENT and folderM will find node folderC.");
Expand All @@ -74,7 +74,7 @@ public void testSecondaryParent_withNodeHavingOneSecondaryChild()
}

@Test(groups = TestGroup.SEARCH)
public void testSecondaryParent_withNodeHavingTwoSecondaryChildren()
public void testSecondaryParentWithNodeHavingTwoSecondaryChildren()
{
// then
STEP("Verify that searching by PARENT and folderL will find nodes: folderM, FolderC and folderY.");
Expand All @@ -88,7 +88,7 @@ public void testSecondaryParent_withNodeHavingTwoSecondaryChildren()
}

@Test(groups = TestGroup.SEARCH)
public void testSecondaryParent_withDocumentAsSecondaryChild()
public void testSecondaryParentWithDocumentAsSecondaryChild()
{
// then
STEP("Verify that searching by PARENT and folderA will find nodes: folderB and file.");
Expand Down Expand Up @@ -118,7 +118,7 @@ public void testSecondaryParent_withDocumentAsSecondaryChild()
* </pre>
*/
@Test(groups = TestGroup.SEARCH)
public void testSecondaryParent_withDeletedSecondaryRelationship()
public void testSecondaryParentWithDeletedSecondaryRelationship()
{
// given
STEP("Add to folderQ a secondary child folderR and verify if it can be found using PARENT index and secondary parent node reference.");
Expand Down Expand Up @@ -158,7 +158,7 @@ public void testSecondaryParent_withDeletedSecondaryRelationship()
* </pre>
*/
@Test(groups = TestGroup.SEARCH)
public void testSecondaryParent_withDeletedSecondaryParentNode()
public void testSecondaryParentWithDeletedSecondaryParentNode()
{
// given
STEP("Create two nested folders (D and E) in Document Library.");
Expand Down Expand Up @@ -206,7 +206,7 @@ public void testSecondaryParent_withDeletedSecondaryParentNode()
* will update PARENT index in ES.
*/
@Test(groups = TestGroup.SEARCH)
public void testSecondaryParent_withMovedSecondaryParentNode()
public void testSecondaryParentWithMovedSecondaryParentNode()
{
// given
STEP("Create folderD inside folderQ, and add folderP to D as a secondary child.");
Expand Down Expand Up @@ -269,7 +269,7 @@ public void testSecondaryParent_withMovedSecondaryParentNode()
* </pre>
*/
@Test(groups = TestGroup.SEARCH)
public void testSecondaryParent_withCopiedSecondaryParentNode()
public void testSecondaryParentWithCopiedSecondaryParentNode()
{
// given
STEP("Create nested folders (G and H) inside folderS and folderT in Document Library. Make folderP a secondary child of folderG.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public void dataPreparation()
}

@Test(groups = TestGroup.SEARCH)
public void testSecondaryPath_withNodeHavingOneSecondaryChild()
public void testSecondaryPathWithNodeHavingOneSecondaryChild()
{
// then
STEP("Verify that folderC can be found by secondary PATH using secondary parent folderM.");
Expand All @@ -75,7 +75,7 @@ public void testSecondaryPath_withNodeHavingOneSecondaryChild()
}

@Test(groups = TestGroup.SEARCH)
public void testSecondaryPath_withNodeHavingOnePrimaryAndTwoSecondaryChildren()
public void testSecondaryPathWithNodeHavingOnePrimaryAndTwoSecondaryChildren()
{
// then
STEP("Verify that primary and secondary children of folderL can be found using PATH index.");
Expand All @@ -91,7 +91,7 @@ public void testSecondaryPath_withNodeHavingOnePrimaryAndTwoSecondaryChildren()
}

@Test(groups = TestGroup.SEARCH)
public void testSecondaryPath_withNodeHavingDocumentAsSecondaryChild()
public void testSecondaryPathWithNodeHavingDocumentAsSecondaryChild()
{
// then
STEP("Verify that a file being a secondary child of folderA can be found using PATH index.");
Expand All @@ -105,7 +105,7 @@ public void testSecondaryPath_withNodeHavingDocumentAsSecondaryChild()
}

@Test(groups = TestGroup.SEARCH)
public void testSecondaryPath_withNodeHavingComplexSecondaryRelationship()
public void testSecondaryPathWithNodeHavingComplexSecondaryRelationship()
{
// then
STEP("Verify that all secondary children of folderX can be found.");
Expand Down Expand Up @@ -141,7 +141,7 @@ public void testSecondaryPath_withNodeHavingComplexSecondaryRelationship()
* </pre>
*/
@Test(groups = TestGroup.SEARCH)
public void testSecondaryPath_withDeletedSecondaryRelationship()
public void testSecondaryPathWithDeletedSecondaryRelationship()
{
// given
STEP("Add to folderQ a secondary child folderR and verify if it can be found using PATH index and secondary parent name.");
Expand Down Expand Up @@ -181,7 +181,7 @@ public void testSecondaryPath_withDeletedSecondaryRelationship()
* </pre>
*/
@Test(groups = TestGroup.SEARCH)
public void testSecondaryPath_withDeletedSecondaryParentNode()
public void testSecondaryPathWithDeletedSecondaryParentNode()
{
// given
STEP("Create two nested folders (D and E) in Document Library.");
Expand Down Expand Up @@ -231,7 +231,7 @@ public void testSecondaryPath_withDeletedSecondaryParentNode()
* will update PATH index in ES.
*/
@Test(groups = TestGroup.SEARCH)
public void testSecondaryPath_withMovedSecondaryParentNode()
public void testSecondaryPathWithMovedSecondaryParentNode()
{
// given
STEP("Create folderD inside folderQ, and add folderP as a secondary child.");
Expand Down Expand Up @@ -303,7 +303,7 @@ public void testSecondaryPath_withMovedSecondaryParentNode()
* </pre>
*/
@Test(groups = TestGroup.SEARCH)
public void testSecondaryParent_withCopiedSecondaryParentNode()
public void testSecondaryParentWithCopiedSecondaryParentNode()
{
// given
STEP("Create nested folders (G and H) inside folderS and folderT in Document Library. Make folderP a secondary child of folderG.");
Expand Down

0 comments on commit 84bcee8

Please sign in to comment.