use of com.intellij.openapi.progress.EmptyProgressIndicator in project intellij-community by JetBrains.
the class SvnNativeClientAuthTest method updateSimple.
private void updateSimple(File wc1) {
Assert.assertTrue(wc1.isDirectory());
final VirtualFile vf = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(wc1);
final UpdatedFiles files = UpdatedFiles.create();
final UpdateSession session = myVcs.getUpdateEnvironment().updateDirectories(new FilePath[] { VcsUtil.getFilePath(vf) }, files, new EmptyProgressIndicator(), new Ref<>());
Assert.assertTrue(session.getExceptions() == null || session.getExceptions().isEmpty());
Assert.assertTrue(!session.isCanceled());
if (myIsSecure) {
++myExpectedCreds;
++myExpectedCert;
}
}
use of com.intellij.openapi.progress.EmptyProgressIndicator in project intellij-community by JetBrains.
the class SvnProtocolsTest method testUpdateImpl.
// todo this test writes to repository - so it's disabled for now - while admins are preparing a server
/*
@Test
public void testUpdateAndCommit() throws Exception {
for (String url : ourTestURL) {
final File wc1 = testCheckoutImpl(url);
final File wc2 = testCheckoutImpl(url);
final File file = testCommitImpl(wc1);
System.out.println("Committed file: " + file.getPath());
testUpdateImpl(wc2, file);
}
}*/
private void testUpdateImpl(File wc1, final File created) {
Assert.assertTrue(wc1.isDirectory());
final VirtualFile vf = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(wc1);
final UpdatedFiles files = UpdatedFiles.create();
final UpdateSession session = myVcs.getUpdateEnvironment().updateDirectories(new FilePath[] { VcsUtil.getFilePath(vf) }, files, new EmptyProgressIndicator(), new Ref<>());
Assert.assertTrue(session.getExceptions() == null || session.getExceptions().isEmpty());
Assert.assertTrue(!session.isCanceled());
Assert.assertTrue(!files.getGroupById(FileGroup.CREATED_ID).getFiles().isEmpty());
final String path = files.getGroupById(FileGroup.CREATED_ID).getFiles().iterator().next();
final String name = path.substring(path.lastIndexOf(File.separator) + 1);
Assert.assertEquals(created.getName(), name);
}
use of com.intellij.openapi.progress.EmptyProgressIndicator in project intellij-community by JetBrains.
the class MavenImportingTestCase method executeGoal.
protected void executeGoal(String relativePath, String goal) {
VirtualFile dir = myProjectRoot.findFileByRelativePath(relativePath);
MavenRunnerParameters rp = new MavenRunnerParameters(true, dir.getPath(), Arrays.asList(goal), Collections.<String>emptyList());
MavenRunnerSettings rs = new MavenRunnerSettings();
MavenExecutor e = new MavenExternalExecutor(myProject, rp, getMavenGeneralSettings(), rs, new SoutMavenConsole());
e.execute(new EmptyProgressIndicator());
}
use of com.intellij.openapi.progress.EmptyProgressIndicator in project intellij-community by JetBrains.
the class MantisIntegrationTest method testMantis12.
public void testMantis12() throws Exception {
assertTrue(myRepository.getProjects().size() >= 2);
final MantisProject mantisProject = myRepository.getProjects().get(1);
assertEquals(mantisProject.getName(), "Mantis 1.2 project 1");
myRepository.setCurrentProject(mantisProject);
assertTrue(mantisProject.getFilters().size() >= 2);
MantisFilter mantisFilter = null;
for (MantisFilter filter : mantisProject.getFilters()) {
if (filter.getName().equals("Mantis 1.2 Filter 1")) {
mantisFilter = filter;
}
}
assertNotNull(mantisFilter);
myRepository.setCurrentFilter(mantisFilter);
final Task[] issues = myRepository.getIssues("", 0, 1, true, new EmptyProgressIndicator());
assertTrue(issues.length >= 1);
final Task task = issues[0];
assertEquals("1", task.getId());
// not available here, but is defined in practice, after task has been activated and thus updated from server
//assertEquals("Mantis 1.2 project 1", task.getProject());
assertEquals("1", task.getNumber());
assertEquals("M12P1I1", task.getSummary());
final Task task1 = myRepository.findTask("1");
assertNotNull(task1);
assertEquals("1", task1.getId());
assertEquals("Mantis 1.2 project 1", task1.getProject());
assertEquals("1", task1.getNumber());
assertEquals("M12P1I1", task1.getSummary());
assertEquals(".", task1.getDescription());
HttpClient client = new HttpClient();
final GetMethod method = new GetMethod(task1.getIssueUrl());
client.executeMethod(method);
assertEquals(method.getStatusCode(), 200);
}
use of com.intellij.openapi.progress.EmptyProgressIndicator in project intellij-community by JetBrains.
the class ArchetypesTest method testGenerating.
public void testGenerating() throws Exception {
if (!hasMavenInstallation())
return;
File dir = new File(myDir.getPath(), "generated");
dir.mkdirs();
MavenRunnerParameters params = new MavenRunnerParameters(false, dir.getPath(), Arrays.asList("org.apache.maven.plugins:maven-archetype-plugin:RELEASE:generate"), Collections.<String>emptyList());
MavenRunnerSettings settings = new MavenRunnerSettings();
Map<String, String> props = new THashMap<>();
props.put("archetypeGroupId", "org.apache.maven.archetypes");
props.put("archetypeArtifactId", "maven-archetype-quickstart");
props.put("archetypeVersion", "1.0");
props.put("interactiveMode", "false");
props.put("groupId", "foo");
props.put("groupId", "foo");
props.put("artifactId", "bar");
settings.setMavenProperties(props);
MavenExecutor exec;
settings.setJreName(MavenRunnerSettings.USE_INTERNAL_JAVA);
exec = new MavenExternalExecutor(myProject, params, getMavenGeneralSettings(), settings, NULL_MAVEN_CONSOLE);
exec.execute(new EmptyProgressIndicator());
assertTrue(new File(dir, "bar/pom.xml").exists());
}
Aggregations