Skip to content

Commit fc0478e

Browse files
matthijskooijmancmaglie
authored andcommitted
CommandLineTest: Run findBuildPaths only once
Previously, it was ran before each test, but just running it once before all tests is sufficient. So switch from @before to @BeforeClass and make the its result variable static.
1 parent bdfa7f3 commit fc0478e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

app/test/processing/app/CommandLineTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,19 @@
3535

3636
import org.apache.commons.compress.utils.IOUtils;
3737
import org.fest.assertions.Assertions;
38-
import org.junit.Before;
38+
import org.junit.BeforeClass;
3939
import org.junit.Test;
4040

4141
import processing.app.helpers.OSUtils;
4242
import processing.app.helpers.PreferencesMap;
4343

4444
public class CommandLineTest {
4545

46-
File buildPath;
47-
File arduinoPath;
46+
private static File buildPath;
47+
private static File arduinoPath;
4848

49-
@Before
50-
public void findBuildPaths() throws Exception {
49+
@BeforeClass
50+
public static void findBuildPaths() throws Exception {
5151
buildPath = new File(System.getProperty("user.dir"));
5252
while (!new File(buildPath, "build").isDirectory()) {
5353
buildPath = buildPath.getParentFile();

0 commit comments

Comments
 (0)