public abstract class AbstractMavenProjectTestCase
extends junit.framework.TestCase
Modifier and Type | Field and Description |
---|---|
static int |
DELETE_RETRY_COUNT |
static long |
DELETE_RETRY_DELAY |
protected org.eclipse.core.runtime.jobs.Job |
downloadSourcesJob |
protected IMavenConfiguration |
mavenConfiguration |
protected static org.eclipse.core.runtime.IProgressMonitor |
monitor |
protected ProjectRegistryRefreshJob |
projectRefreshJob |
protected File |
repo |
protected org.eclipse.core.resources.IWorkspace |
workspace |
Constructor and Description |
---|
AbstractMavenProjectTestCase() |
Modifier and Type | Method and Description |
---|---|
protected static void |
assertNoErrors(org.eclipse.core.resources.IProject project) |
protected void |
copyContent(org.eclipse.core.resources.IProject project,
File from,
String to) |
protected void |
copyContent(org.eclipse.core.resources.IProject project,
String from,
String to) |
protected void |
copyContent(org.eclipse.core.resources.IProject project,
String from,
String to,
boolean waitForJobsToComplete) |
static void |
copyDir(File src,
File dst) |
static void |
copyDir(File src,
File dst,
FileFilter filter) |
protected org.eclipse.core.resources.IProject |
createExisting(String projectName,
String projectLocation) |
protected org.eclipse.core.resources.IProject |
createProject(String projectName,
String pomResource) |
protected void |
deleteProject(org.eclipse.core.resources.IProject project) |
protected void |
deleteProject(String projectName) |
protected void |
deserializeFromWorkspaceState(IMavenProjectFacade projectFacade)
Nullifies all transient IMavenProjectFacade fields, which should have roughly the same effect as writing it to
workspace state and reading it back after workspace restart.
|
protected static List<org.eclipse.core.resources.IMarker> |
findErrorMarkers(org.eclipse.core.resources.IProject project) |
protected static List<org.eclipse.core.resources.IMarker> |
findMarkers(org.eclipse.core.resources.IProject project,
int targetSeverity) |
protected org.eclipse.jdt.core.IClasspathEntry[] |
getMavenContainerEntries(org.eclipse.core.resources.IProject project) |
protected org.eclipse.core.resources.IProject |
importProject(String pomLocation)
Import a test project into the Eclipse workspace
|
protected org.eclipse.core.resources.IProject |
importProject(String pomLocation,
ResolverConfiguration configuration)
Import a test project into the Eclipse workspace
|
protected org.eclipse.core.resources.IProject |
importProject(String projectName,
String projectLocation,
ProjectImportConfiguration importConfiguration) |
protected org.eclipse.core.resources.IProject |
importProject(String projectName,
String projectLocation,
ResolverConfiguration configuration) |
protected org.eclipse.core.resources.IProject[] |
importProjects(String basedir,
String[] pomNames,
ResolverConfiguration configuration)
Import test projects into the Eclipse workspace
|
protected org.eclipse.core.resources.IProject[] |
importProjects(String basedir,
String[] pomNames,
ResolverConfiguration configuration,
boolean skipSanityCheck) |
protected void |
injectFilexWagon() |
void |
runTest() |
protected void |
setUp() |
protected void |
tearDown() |
protected static String |
toString(org.eclipse.core.resources.IMarker[] markers) |
protected static String |
toString(List<org.eclipse.core.resources.IMarker> markers) |
protected void |
waitForJobsToComplete() |
static void |
waitForJobsToComplete(org.eclipse.core.runtime.IProgressMonitor monitor) |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, setName, toString
public static final int DELETE_RETRY_COUNT
public static final long DELETE_RETRY_DELAY
protected static final org.eclipse.core.runtime.IProgressMonitor monitor
protected org.eclipse.core.resources.IWorkspace workspace
protected File repo
protected ProjectRegistryRefreshJob projectRefreshJob
protected org.eclipse.core.runtime.jobs.Job downloadSourcesJob
protected IMavenConfiguration mavenConfiguration
protected void setUp() throws Exception
setUp
in class junit.framework.TestCase
Exception
protected void tearDown() throws Exception
tearDown
in class junit.framework.TestCase
Exception
protected void deleteProject(String projectName) throws org.eclipse.core.runtime.CoreException, InterruptedException
org.eclipse.core.runtime.CoreException
InterruptedException
protected void deleteProject(org.eclipse.core.resources.IProject project) throws InterruptedException, org.eclipse.core.runtime.CoreException
InterruptedException
org.eclipse.core.runtime.CoreException
protected org.eclipse.core.resources.IProject createProject(String projectName, String pomResource) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
protected org.eclipse.core.resources.IProject createExisting(String projectName, String projectLocation) throws IOException, org.eclipse.core.runtime.CoreException
IOException
org.eclipse.core.runtime.CoreException
protected org.eclipse.core.resources.IProject importProject(String pomLocation) throws IOException, org.eclipse.core.runtime.CoreException
pomLocation
- - a relative location of the pom file for the project to importIOException
org.eclipse.core.runtime.CoreException
protected org.eclipse.core.resources.IProject importProject(String pomLocation, ResolverConfiguration configuration) throws IOException, org.eclipse.core.runtime.CoreException
pomLocation
- - a relative location of the pom file for the project to importconfiguration
- - a resolver configuration to be used to configure imported projectIOException
org.eclipse.core.runtime.CoreException
protected org.eclipse.core.resources.IProject[] importProjects(String basedir, String[] pomNames, ResolverConfiguration configuration) throws IOException, org.eclipse.core.runtime.CoreException
basedir
- - a base directory for all projects to importpomNames
- - a relative locations of the pom files for the projects to importconfiguration
- - a resolver configuration to be used to configure imported projectsIOException
org.eclipse.core.runtime.CoreException
protected org.eclipse.core.resources.IProject[] importProjects(String basedir, String[] pomNames, ResolverConfiguration configuration, boolean skipSanityCheck) throws IOException, org.eclipse.core.runtime.CoreException
IOException
org.eclipse.core.runtime.CoreException
protected org.eclipse.core.resources.IProject importProject(String projectName, String projectLocation, ResolverConfiguration configuration) throws IOException, org.eclipse.core.runtime.CoreException
IOException
org.eclipse.core.runtime.CoreException
protected org.eclipse.core.resources.IProject importProject(String projectName, String projectLocation, ProjectImportConfiguration importConfiguration) throws IOException, org.eclipse.core.runtime.CoreException
IOException
org.eclipse.core.runtime.CoreException
protected void waitForJobsToComplete() throws InterruptedException, org.eclipse.core.runtime.CoreException
InterruptedException
org.eclipse.core.runtime.CoreException
public static void waitForJobsToComplete(org.eclipse.core.runtime.IProgressMonitor monitor) throws InterruptedException, org.eclipse.core.runtime.CoreException
InterruptedException
org.eclipse.core.runtime.CoreException
protected org.eclipse.jdt.core.IClasspathEntry[] getMavenContainerEntries(org.eclipse.core.resources.IProject project) throws org.eclipse.jdt.core.JavaModelException
org.eclipse.jdt.core.JavaModelException
protected static String toString(org.eclipse.core.resources.IMarker[] markers)
protected void copyContent(org.eclipse.core.resources.IProject project, String from, String to) throws Exception
Exception
protected void copyContent(org.eclipse.core.resources.IProject project, String from, String to, boolean waitForJobsToComplete) throws Exception
Exception
protected void copyContent(org.eclipse.core.resources.IProject project, File from, String to) throws Exception
Exception
public static void copyDir(File src, File dst) throws IOException
IOException
public static void copyDir(File src, File dst, FileFilter filter) throws IOException
IOException
protected static List<org.eclipse.core.resources.IMarker> findErrorMarkers(org.eclipse.core.resources.IProject project) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
protected static List<org.eclipse.core.resources.IMarker> findMarkers(org.eclipse.core.resources.IProject project, int targetSeverity) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
protected static void assertNoErrors(org.eclipse.core.resources.IProject project) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
protected void deserializeFromWorkspaceState(IMavenProjectFacade projectFacade) throws IllegalAccessException
IllegalAccessException
Copyright © 2005–2015 Sonatype, Inc.. All rights reserved.