File tree 1 file changed +7
-11
lines changed
smack-openpgp/src/test/java/org/jivesoftware/smackx/ox
1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change 38
38
39
39
import org .bouncycastle .openpgp .PGPException ;
40
40
import org .bouncycastle .openpgp .PGPSecretKeyRing ;
41
- import org .junit .AfterClass ;
42
- import org .junit .BeforeClass ;
41
+ import org .junit .jupiter .api .AfterAll ;
43
42
import org .junit .jupiter .api .Assertions ;
43
+ import org .junit .jupiter .api .BeforeAll ;
44
44
import org .junit .jupiter .api .Test ;
45
45
import org .jxmpp .jid .BareJid ;
46
46
import org .jxmpp .jid .impl .JidCreate ;
49
49
50
50
public class SecretKeyBackupHelperTest extends SmackTestSuite {
51
51
52
- private static final File basePath ;
52
+ private static File basePath ;
53
53
54
- static {
55
- try {
56
- basePath = Files .createTempDirectory ("ox_secret_keys_" ).toFile ();
57
- } catch (IOException e ) {
58
- throw new AssertionError (e );
59
- }
54
+ @ BeforeAll
55
+ public static void createTemptDir () throws IOException {
56
+ basePath = Files .createTempDirectory ("ox_secret_keys_" ).toFile ();
60
57
}
61
58
62
59
@ Test
@@ -98,8 +95,7 @@ public void createAndDecryptSecretKeyElementTest()
98
95
Assertions .assertArrayEquals (secretKeys .getEncoded (), secretKeyRing .getEncoded ());
99
96
}
100
97
101
- @ AfterClass
102
- @ BeforeClass
98
+ @ AfterAll
103
99
public static void deleteDirs () throws IOException {
104
100
org .apache .commons .io .FileUtils .deleteDirectory (basePath );
105
101
}
You can’t perform that action at this time.
0 commit comments