File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
src/test/java/org/scijava/plugins/scripting/java Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,32 @@ public void testEvalReader() throws Exception {
167167 assertTrue (result );
168168 }
169169
170+ @ Test
171+ public void testAnnotations () {
172+ boolean result = true ;
173+ final String source = "" + //
174+ "import org.scijava.command.Command;\n " + //
175+ "import org.scijava.plugin.Plugin;\n " + //
176+ "@Plugin(type = Command.class)\n " + //
177+ "public class PluginTest implements Command {\n " + //
178+ "\t @Override\n " + //
179+ "\t public void run() {\n " + //
180+ "\t \t System.out.println(\" I am a plugin!\" );\n " + //
181+ "\t }\n " + //
182+ "}" ;
183+
184+ final ScriptEngine miniMaven = miniMaven ();
185+ try {
186+ miniMaven .eval (source );
187+ }
188+ catch (final ScriptException e ) {
189+ e .printStackTrace ();
190+ result = false ;
191+ }
192+
193+ assertTrue (result );
194+ }
195+
170196 // -- helper functions
171197
172198 private File makeMinimalProject () throws IOException {
You can’t perform that action at this time.
0 commit comments