Skip to content

Commit

Permalink
Fix tests import
Browse files Browse the repository at this point in the history
  • Loading branch information
hmiguim committed Nov 8, 2023
1 parent b09d52e commit 5568877
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
*/
package org.roda.core.index;

import static org.junit.Assert.assertTrue;
import static org.testng.AssertJUnit.assertEquals;
import static org.testng.AssertJUnit.assertTrue;
import static org.testng.AssertJUnit.fail;

import java.io.IOException;
import java.net.URISyntaxException;
Expand Down Expand Up @@ -60,19 +61,15 @@
@Test(groups = {RodaConstants.TEST_GROUP_DEV})
public class FilterTest {
private static final Logger LOGGER = LoggerFactory.getLogger(FilterTest.class);

private static final int PAGE_SIZE = 5;
private static final int PREMIS_CORPORA_SIZE = 8474;
private static final String REPRESENTATION_ID = CorporaConstants.REPRESENTATION_1_ID;
private static Path basePath;

private static Path corporaPath;
private static StorageService corporaService;

private static ModelService model;
private static IndexService index;

private static final int PAGE_SIZE = 5;
private static final int PREMIS_CORPORA_SIZE = 8474;
private static final String REPRESENTATION_ID = CorporaConstants.REPRESENTATION_1_ID;

@BeforeClass
public static void setUp() throws URISyntaxException, GenericException {
URL corporaURL = ModelServiceTest.class.getResource("/corpora");
Expand Down Expand Up @@ -283,9 +280,9 @@ public void run() {
IndexedFile file = index.retrieve(IndexedFile.class, uuid,
Arrays.asList(RodaConstants.INDEX_UUID, RodaConstants.FILE_HASH));

assertTrue("File " + id + " has no hash field", 0 < file.getHash().size());
assertTrue("File " + id + " has no hash field", file.getHash().isEmpty());
} catch (NotFoundException e) {
assertTrue("File " + id + " was not found on index", false);
fail("File " + id + " was not found on index");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
package org.roda.core.index;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.testng.AssertJUnit.assertEquals;
import static org.testng.AssertJUnit.assertNotNull;
import static org.testng.AssertJUnit.assertTrue;

import java.io.IOException;
import java.net.URISyntaxException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/
package org.roda.core.model;

import static org.junit.Assert.fail;
import static org.testng.AssertJUnit.fail;
import static org.testng.AssertJUnit.assertEquals;
import static org.testng.AssertJUnit.assertTrue;

Expand Down

0 comments on commit 5568877

Please sign in to comment.