Skip to content
Closed
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 @@ -26,6 +26,7 @@
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.CountDownLatch;
import org.junit.Ignore;
import org.netbeans.api.project.Project;
import org.netbeans.api.project.ProjectManager;
import org.netbeans.junit.NbModuleSuite;
Expand Down Expand Up @@ -59,6 +60,7 @@ protected void setUp() throws Exception {
clearWorkDir();
}

@Ignore
public void testGradleProjectTemplates() throws Exception {
FileObject root = FileUtil.getConfigFile("Templates/Project/Gradle");
assertNotNull("Gradle project folder found", root);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import java.util.Set;
import java.util.concurrent.CountDownLatch;
import junit.framework.AssertionFailedError;
import org.junit.Ignore;
import org.junit.Test;
import org.netbeans.api.java.classpath.ClassPath;
import org.netbeans.api.project.FileOwnerQuery;
Expand All @@ -45,6 +46,8 @@
import org.openide.filesystems.FileUtil;
import org.openide.util.lookup.Lookups;

import static org.netbeans.modules.gradle.api.NbGradleProject.Quality.EVALUATED;

/**
*
* @author lkishalmi
Expand Down Expand Up @@ -94,7 +97,7 @@ public void testRuntimeClassPath() throws Exception {
private void createSimpleApp() throws IOException {
FileObject d = FileUtil.toFileObject(getDataDir());
FileObject main = d.getFileObject("javasimple/src/main/java/test/App.java");
project = createGradleProject(path, "apply plugin: 'java'", null);
project = createGradleProject(path, "apply plugin: 'java'", "");
FileObject src = FileUtil.createFolder(project, "src/main/java/test");
java = FileUtil.copyFile(main, src, main.getName());
}
Expand Down Expand Up @@ -212,7 +215,7 @@ public void testCompileNonemptyOnceCompiled() throws Exception {
ProjectTrust.getDefault().distrustProject(prj);

NbGradleProject ngp = NbGradleProject.get(prj);
assertTrue("Closed project should be at least EVALUATED", ngp.getQuality().atLeast(NbGradleProject.Quality.EVALUATED));
assertTrue("Closed project should be at least EVALUATED", ngp.getQuality().atLeast(EVALUATED));

ClassPath cp = ClassPath.getClassPath(java, ClassPath.COMPILE);
assertFalse("Cached project must know its COMPILE path", cp.getRoots().length == 0);
Expand All @@ -222,11 +225,14 @@ public void testCompileNonemptyOnceCompiled() throws Exception {
* Checks that a trusted, once compiled project will provide nonempty compile classpath
* just after open.
*/
@Ignore
public void testCompilePreTrusted() throws Exception {
path = "first";
createSimpleApp();
Project prj = FileOwnerQuery.getOwner(java);
compileProject(prj);

assertTrue("Closed project should be at least EVALUATED", NbGradleProject.get(prj).getQuality().atLeast(EVALUATED));

// open the project - and then close it, so the project is ditched by Gradle module.
openAndCloseProject(prj);
Expand Down