@@ -264,6 +264,24 @@ public void testParameters() {
264264 }
265265 }
266266
267+ /**
268+ * Ensures the ScriptInfos Reader can be reused for multiple executions of the
269+ * script.
270+ */
271+ @ Test
272+ public void testReaderSanity () throws Exception {
273+ final String script = "" + //
274+ "% @LogService log\n " + //
275+ "% @OUTPUT Integer output" ;
276+
277+ final ScriptInfo info =
278+ new ScriptInfo (context , "hello.bsizes" , new StringReader (script ));
279+ final BufferedReader reader1 = info .getReader ();
280+ final BufferedReader reader2 = info .getReader ();
281+
282+ assertEquals ("Readers are not independent." , reader1 .read (), reader2 .read ());
283+ }
284+
267285 private void assertItem (final String name , final Class <?> type ,
268286 final String label , final ItemIO ioType , final boolean required ,
269287 final boolean persist , final String persistKey , final String style ,
@@ -288,25 +306,6 @@ private void assertItem(final String name, final Class<?> type,
288306 assertEquals (choices , item .getChoices ());
289307 }
290308
291- /**
292- * Ensures the ScriptInfos Reader can be reused for multiple executions of the
293- * script.
294- */
295- @ Test
296- public void testReaderSanity () throws Exception {
297- final String script = "" + //
298- "% @LogService log\n " + //
299- "% @OUTPUT Integer output" ;
300-
301- final ScriptInfo info =
302- new ScriptInfo (context , "hello.bsizes" , new StringReader (script ));
303- final BufferedReader reader1 = info .getReader ();
304- final BufferedReader reader2 = info .getReader ();
305-
306- assertEquals ("Readers are not independent." , reader1 .read (), reader2 .read ());
307-
308- }
309-
310309 @ Plugin (type = ScriptLanguage .class )
311310 public static class BindingSizes extends AbstractScriptLanguage {
312311
0 commit comments