Skip to content

Commit

Permalink
Resolve Codacy code issues
Browse files Browse the repository at this point in the history
  • Loading branch information
solth committed Nov 14, 2023
1 parent 0415270 commit 98d19c2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,11 @@ private void cleanUp() throws IOException {
TreeDeleter.deltree(firstDirectoryOfTestPath);
}

/**
* Cleanup test resources and dummy processes after test completion.
*
* @throws Exception when removing process from database, index or filesystem fails.
*/
@AfterClass
public static void removeDummyAndTestProcesses() throws Exception {
for (int processId : dummyProcessIds) {
Expand Down
20 changes: 10 additions & 10 deletions Kitodo/src/test/java/org/kitodo/utils/ProcessTestUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

import java.io.IOException;
import java.net.URI;
import java.nio.file.Paths;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.stream.Collectors;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.kitodo.MockDatabase;
Expand All @@ -27,14 +35,6 @@
import org.kitodo.production.services.ServiceManager;
import org.primefaces.model.DefaultTreeNode;

import java.io.IOException;
import java.net.URI;
import java.nio.file.Paths;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.stream.Collectors;

public class ProcessTestUtils {

private static final String TEST_IMAGES_DIR = "images";
Expand Down Expand Up @@ -117,8 +117,8 @@ public static void copyTestMetadataFile(int processId, String filename) throws I
}

/**
* Add process with given title "processTitle" and to project with configured ID 'TEST_PROJECT_ID' and template 'TEST_TEMPLATE_ID'
* to mock database
* Add process with given title "processTitle" and to project with configured ID 'TEST_PROJECT_ID' and template
* 'TEST_TEMPLATE_ID' to mock database.
* @param processTitle title of process to add
* @return created process
* @throws DAOException when adding process fails
Expand Down

0 comments on commit 98d19c2

Please sign in to comment.