eppleton commented on code in PR #9666:
URL: https://github.com/apache/netbeans/pull/9666#discussion_r4181150447
##########
java/java.file.launcher/test/unit/src/org/netbeans/modules/java/file/launcher/actions/JavaFileTest.java:
##########
@@ -79,9 +94,64 @@ public static void main (String args[]) {
}
}
}
-
+ public void testSingleFileRunAvailableInNoProject() throws Exception {
+ FileObject fallbackDir = FileUtil.toFileObject(getWorkDir());
+
+ Lookup lkp = Lookups.fixed(javaFO);
+
+ SingleJavaSourceRunActionProvider ap = new
SingleJavaSourceRunActionProvider();
+ boolean runEnabled =
ap.isActionEnabled(ActionProvider.COMMAND_RUN_SINGLE, lkp);
+ assertTrue("Run is enabled in Java-less project", runEnabled);
+ boolean debugEnabled =
ap.isActionEnabled(ActionProvider.COMMAND_DEBUG_SINGLE, lkp);
+ assertTrue("Run is enabled in Java-less project", debugEnabled);
+ }
+
+ public void testSingleFileRunAvailableInFallbackProject() throws Exception
{
+ FileObject fallbackDir = FileUtil.toFileObject(getWorkDir());
+ Project fallback =
ProjectManager.getDefault().findProjectOrFallback(fallbackDir);
+ assertNotNull("Fallback project found", fallback);
Review Comment:
The tests don't compile on master. Both new test classes call
ProjectManager.findProjectOrFallback()
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists