Skip to content

Commit 2ca24a3

Browse files
committed
Refactor tests
1 parent 7d09a2c commit 2ca24a3

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

core-java/src/test/java/com/baeldung/java/nio2/attributes/BasicAttribsTest.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.baeldung.java.nio2.attributes;
22

3-
import static org.junit.Assert.assertFalse;
4-
import static org.junit.Assert.assertTrue;
3+
import org.junit.BeforeClass;
4+
import org.junit.Test;
55

66
import java.io.IOException;
77
import java.nio.file.Files;
@@ -11,15 +11,15 @@
1111
import java.nio.file.attribute.BasicFileAttributes;
1212
import java.nio.file.attribute.FileTime;
1313

14-
import org.junit.Before;
15-
import org.junit.Test;
14+
import static org.junit.Assert.assertFalse;
15+
import static org.junit.Assert.assertTrue;
1616

1717
public class BasicAttribsTest {
1818
private static final String HOME = System.getProperty("user.home");
19-
BasicFileAttributes basicAttribs;
19+
private static BasicFileAttributes basicAttribs;
2020

21-
@Before
22-
public void setup() throws IOException {
21+
@BeforeClass
22+
public static void setup() throws IOException {
2323
Path home = Paths.get(HOME);
2424
BasicFileAttributeView basicView = Files.getFileAttributeView(home, BasicFileAttributeView.class);
2525
basicAttribs = basicView.readAttributes();

0 commit comments

Comments
 (0)