File tree Expand file tree Collapse file tree
core-java/src/test/java/com/baeldung/java/nio2/attributes Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package 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
66import java .io .IOException ;
77import java .nio .file .Files ;
1111import java .nio .file .attribute .BasicFileAttributes ;
1212import 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
1717public 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 ();
You can’t perform that action at this time.
0 commit comments