Skip to content

Commit 84df87e

Browse files
committed
ScriptInfoTest: apply code style template
1 parent 2eb9662 commit 84df87e

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

src/test/java/org/scijava/script/ScriptInfoTest.java

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -84,24 +84,25 @@ public static void tearDown() {
8484
*/
8585
@Test
8686
public void testParameterParsing() throws Exception {
87-
final String script =
88-
"" + "% @LogService log\n"
89-
+ "% @OUTPUT Integer output"
90-
+ "% kraken@blah.net\n";
91-
ScriptModule scriptModule = scriptService.run("hello.bsizes", script, true).get();
87+
final String script = "" + //
88+
"% @LogService log\n" + //
89+
"% @OUTPUT Integer output" + //
90+
"% kraken@blah.net\n";
91+
final ScriptModule scriptModule =
92+
scriptService.run("hello.bsizes", script, true).get();
9293

93-
Object output = scriptModule.getOutput("result");
94+
final Object output = scriptModule.getOutput("result");
9495

9596
if (output == null || !(output instanceof Integer)) fail();
96-
assertEquals(3, ((Integer)output).intValue());
97+
assertEquals(3, ((Integer) output).intValue());
9798
}
9899

99100
/** Tests {@link ScriptInfo#getVersion()}. */
100101
@Test
101102
public void testVersion() throws IOException {
102-
final String script =
103-
"% @LogService log\n"
104-
+ "% @OUTPUT int output";
103+
final String script = "" + //
104+
"% @LogService log\n" + //
105+
"% @OUTPUT int output";
105106

106107
// write script to a temporary directory on disk
107108
final File tmpDir = TestUtils.createTemporaryDirectory("script-info-test-");
@@ -148,13 +149,13 @@ private static class BindingSizesEngine extends AbstractScriptEngine {
148149
}
149150

150151
@Override
151-
public Object eval(String script) throws ScriptException {
152+
public Object eval(final String script) throws ScriptException {
152153
return eval(new StringReader(script));
153154
}
154155

155156
@Override
156-
public Object eval(Reader reader) throws ScriptException {
157-
Bindings bindings = getBindings(ScriptContext.ENGINE_SCOPE);
157+
public Object eval(final Reader reader) throws ScriptException {
158+
final Bindings bindings = getBindings(ScriptContext.ENGINE_SCOPE);
158159
return bindings.size();
159160
}
160161
}

0 commit comments

Comments
 (0)