mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-09 00:59:39 +02:00
Remove duplicate FileUtils methods
This commit is contained in:
parent
101a0dbc38
commit
d78733e23a
8 changed files with 52 additions and 68 deletions
|
@ -35,8 +35,8 @@ import java.util.Date;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.jivesoftware.smack.test.util.FileTestUtil;
|
||||
import org.jivesoftware.smack.test.util.SmackTestSuite;
|
||||
import org.jivesoftware.smack.util.FileUtils;
|
||||
import org.jivesoftware.smackx.ox.callback.SecretKeyPassphraseCallback;
|
||||
import org.jivesoftware.smackx.ox.exception.MissingUserIdOnKeyException;
|
||||
import org.jivesoftware.smackx.ox.store.definition.OpenPgpStore;
|
||||
|
@ -65,7 +65,7 @@ import org.pgpainless.util.Passphrase;
|
|||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
public class OpenPgpStoreTest extends SmackTestSuite {
|
||||
|
||||
private static File storagePath;
|
||||
private static final File storagePath;
|
||||
|
||||
private static final BareJid alice = JidTestUtil.BARE_JID_1;
|
||||
private static final BareJid bob = JidTestUtil.BARE_JID_2;
|
||||
|
@ -78,7 +78,7 @@ public class OpenPgpStoreTest extends SmackTestSuite {
|
|||
private final OpenPgpStore openPgpStoreInstance2;
|
||||
|
||||
static {
|
||||
storagePath = FileUtils.getTempDir("storeTest");
|
||||
storagePath = FileTestUtil.getTempDir("storeTest");
|
||||
Security.addProvider(new BouncyCastleProvider());
|
||||
}
|
||||
|
||||
|
@ -101,7 +101,7 @@ public class OpenPgpStoreTest extends SmackTestSuite {
|
|||
@Before
|
||||
@After
|
||||
public void deletePath() {
|
||||
FileUtils.deleteDirectory(storagePath);
|
||||
FileTestUtil.deleteDirectory(storagePath);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -32,8 +32,8 @@ import java.util.List;
|
|||
import org.jivesoftware.smack.DummyConnection;
|
||||
import org.jivesoftware.smack.packet.ExtensionElement;
|
||||
import org.jivesoftware.smack.packet.Message;
|
||||
import org.jivesoftware.smack.test.util.FileTestUtil;
|
||||
import org.jivesoftware.smack.test.util.SmackTestSuite;
|
||||
import org.jivesoftware.smack.util.FileUtils;
|
||||
import org.jivesoftware.smackx.ox.crypto.OpenPgpElementAndMetadata;
|
||||
import org.jivesoftware.smackx.ox.crypto.PainlessOpenPgpProvider;
|
||||
import org.jivesoftware.smackx.ox.element.CryptElement;
|
||||
|
@ -62,13 +62,13 @@ public class PainlessOpenPgpProviderTest extends SmackTestSuite {
|
|||
private static final BareJid bob = JidTestUtil.BARE_JID_2;
|
||||
|
||||
static {
|
||||
storagePath = FileUtils.getTempDir("smack-painlessprovidertest");
|
||||
storagePath = FileTestUtil.getTempDir("smack-painlessprovidertest");
|
||||
}
|
||||
|
||||
@BeforeClass
|
||||
@AfterClass
|
||||
public static void deletePath() {
|
||||
FileUtils.deleteDirectory(storagePath);
|
||||
FileTestUtil.deleteDirectory(storagePath);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -28,8 +28,8 @@ import java.util.Arrays;
|
|||
import java.util.Collections;
|
||||
|
||||
import org.jivesoftware.smack.DummyConnection;
|
||||
import org.jivesoftware.smack.test.util.FileTestUtil;
|
||||
import org.jivesoftware.smack.test.util.SmackTestSuite;
|
||||
import org.jivesoftware.smack.util.FileUtils;
|
||||
import org.jivesoftware.smackx.ox.crypto.PainlessOpenPgpProvider;
|
||||
import org.jivesoftware.smackx.ox.element.SecretkeyElement;
|
||||
import org.jivesoftware.smackx.ox.exception.InvalidBackupCodeException;
|
||||
|
@ -54,7 +54,7 @@ public class SecretKeyBackupHelperTest extends SmackTestSuite {
|
|||
private static final File basePath;
|
||||
|
||||
static {
|
||||
basePath = FileUtils.getTempDir("ox_secret_keys");
|
||||
basePath = FileTestUtil.getTempDir("ox_secret_keys");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -98,6 +98,6 @@ public class SecretKeyBackupHelperTest extends SmackTestSuite {
|
|||
@AfterClass
|
||||
@BeforeClass
|
||||
public static void deleteDirs() {
|
||||
FileUtils.deleteDirectory(basePath);
|
||||
FileTestUtil.deleteDirectory(basePath);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,8 +34,8 @@ import org.jivesoftware.smack.SmackException;
|
|||
import org.jivesoftware.smack.XMPPException;
|
||||
import org.jivesoftware.smack.packet.ExtensionElement;
|
||||
import org.jivesoftware.smack.packet.Message;
|
||||
import org.jivesoftware.smack.test.util.FileTestUtil;
|
||||
import org.jivesoftware.smack.test.util.SmackTestSuite;
|
||||
import org.jivesoftware.smack.util.FileUtils;
|
||||
import org.jivesoftware.smack.util.StringUtils;
|
||||
import org.jivesoftware.smackx.eme.element.ExplicitMessageEncryptionElement;
|
||||
import org.jivesoftware.smackx.ox.OpenPgpContact;
|
||||
|
@ -62,7 +62,7 @@ public class OXInstantMessagingManagerTest extends SmackTestSuite {
|
|||
private static final File basePath;
|
||||
|
||||
static {
|
||||
basePath = FileUtils.getTempDir("ox_im_test_" + StringUtils.randomString(10));
|
||||
basePath = FileTestUtil.getTempDir("ox_im_test_" + StringUtils.randomString(10));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -170,6 +170,6 @@ public class OXInstantMessagingManagerTest extends SmackTestSuite {
|
|||
@AfterClass
|
||||
@BeforeClass
|
||||
public static void deleteDirs() {
|
||||
FileUtils.deleteDirectory(basePath);
|
||||
FileTestUtil.deleteDirectory(basePath);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue