Skip to content

Commit

Permalink
Sanitize SearchActionComponentsTest
Browse files Browse the repository at this point in the history
  • Loading branch information
julienlancelot committed Aug 21, 2017
1 parent fcb9998 commit a0ffc82
Show file tree
Hide file tree
Showing 3 changed files with 184 additions and 297 deletions.
Expand Up @@ -69,12 +69,13 @@ public static ComponentDto newDirectory(ComponentDto module, String uuid, String
} }


public static ComponentDto newSubView(ComponentDto viewOrSubView, String uuid, String key) { public static ComponentDto newSubView(ComponentDto viewOrSubView, String uuid, String key) {
return newChildComponent(uuid, viewOrSubView, viewOrSubView) return newModuleDto(uuid, viewOrSubView)
.setDbKey(key) .setDbKey(key)
.setName(key) .setName(key)
.setLongName(key) .setLongName(key)
.setScope(Scopes.PROJECT) .setScope(Scopes.PROJECT)
.setQualifier(Qualifiers.SUBVIEW); .setQualifier(Qualifiers.SUBVIEW)
.setPath(null);
} }


public static ComponentDto newSubView(ComponentDto viewOrSubView) { public static ComponentDto newSubView(ComponentDto viewOrSubView) {
Expand Down Expand Up @@ -158,6 +159,10 @@ public static ComponentDto newApplication(OrganizationDto organizationDto) {
.setQualifier(Qualifiers.APP); .setQualifier(Qualifiers.APP);
} }


public static ComponentDto newProjectCopy(ComponentDto project, ComponentDto view) {
return newProjectCopy(Uuids.createFast(), project, view);
}

public static ComponentDto newProjectCopy(String uuid, ComponentDto project, ComponentDto view) { public static ComponentDto newProjectCopy(String uuid, ComponentDto project, ComponentDto view) {
checkNotNull(project.getId(), "The project need to be persisted before creating this technical project."); checkNotNull(project.getId(), "The project need to be persisted before creating this technical project.");
return newChildComponent(uuid, view, view) return newChildComponent(uuid, view, view)
Expand Down

0 comments on commit a0ffc82

Please sign in to comment.