Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;

import java.io.FileWriter;
import java.io.IOException;
Expand Down Expand Up @@ -1389,7 +1390,7 @@ public void verifyDelta(IResourceDelta delta) {
* This verifier succeeds if either all expected changes are received in a
* single delta, or if each expected change is received in a delta of its own.
*/
private class MultipleDeltasCharsetVerifier extends org.junit.Assert implements IResourceChangeListener {
private class MultipleDeltasCharsetVerifier implements IResourceChangeListener {

private final int flags;
private final CharsetVerifier singleDeltaVerifier;
Expand Down Expand Up @@ -1482,7 +1483,7 @@ void assertExpectedDeltasWereReceived() {
failMessage.append(deltaVerifier.getMessage());
failMessage.append(System.lineSeparator());
}
assertTrue(failMessage.toString(), validDeltas);
assertTrue(validDeltas, failMessage.toString());
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import static org.eclipse.core.tests.resources.ResourceTestUtil.createTestMonitor;
import static org.eclipse.core.tests.resources.ResourceTestUtil.createUniqueString;
import static org.eclipse.core.tests.resources.ResourceTestUtil.removeFromWorkspace;
import static org.junit.Assert.assertThrows;
import static org.junit.jupiter.api.Assertions.assertThrows;

import java.io.ByteArrayOutputStream;
import java.io.File;
Expand All @@ -49,9 +49,12 @@
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.eclipse.core.tests.resources.util.FileStoreAutoDeleteExtension;
import org.eclipse.core.tests.resources.util.WorkspaceResetExtension;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.api.extension.RegisterExtension;

/**
* Tests the following API methods:
Expand All @@ -61,12 +64,14 @@
* This test tests resource filters with projects, folders, linked resource folders,
* and moving those resources to different parents.
*/
@ExtendWith(WorkspaceResetExtension.class)
public class FilteredResourceTest {

@Rule
public WorkspaceTestRule workspaceRule = new WorkspaceTestRule();

private static final String REGEX_FILTER_PROVIDER = "org.eclipse.core.resources.regexFilterMatcher";

@RegisterExtension
private final FileStoreAutoDeleteExtension fileStoreExtension = new FileStoreAutoDeleteExtension();

protected String childName = "File.txt";
protected IProject closedProject;
protected IFile existingFileInExistingProject;
Expand Down Expand Up @@ -106,7 +111,7 @@ protected URI resolve(URI uri) {
return uri;
}

@Before
@BeforeEach
public void setUp() throws Exception {
existingProject = getWorkspace().getRoot().getProject("ExistingProject");
otherExistingProject = getWorkspace().getRoot().getProject("OtherExistingProject");
Expand All @@ -122,7 +127,7 @@ public void setUp() throws Exception {
nonExistingFileInOtherExistingProject = otherExistingProject.getFile("nonExistingFileInOtherExistingProject");
nonExistingFileInExistingFolder = existingFolderInExistingProject.getFile("nonExistingFileInExistingFolder");
localFolder = getRandomLocation();
workspaceRule.deleteOnTearDown(resolve(localFolder));
fileStoreExtension.deleteOnTearDown(resolve(localFolder));
localFile = localFolder.append(childName);
doCleanup();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
import static org.eclipse.core.tests.resources.ResourceTestUtil.ensureOutOfSync;
import static org.eclipse.core.tests.resources.ResourceTestUtil.removeFromFileSystem;
import static org.eclipse.core.tests.resources.ResourceTestUtil.removeFromWorkspace;
import static org.junit.Assert.assertNull;
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;
Expand Down
Loading
Loading